@twinklecube/create-react-app

boiler plate react 18 typescript app


Keywords
react, react 18.3, typescript, create-react-app
License
ISC
Install
npm install @twinklecube/create-react-app@1.1.0

Documentation

create-react-app

React 18 | typescript

install

npx @twinklecube/create-react-app my-react-app

or install in the current folder
npx @twinklecube/create-react-app .

Run and Build

run in development server
npm start
this command will open the rect app on port 3000
http:localhost:3000

build
npm run build
this command will build the app into the dist folder

Styling - followings are configured and ready to use

  • css
  • css modules
  • sass/scss
  • sass/scss modules
  • less
  • less modules

styled-components and @emotion are tested

install
npm i styled-components or npm i @emotion/styled
and use as usual

Font and Image formats supported

Image formats: jpg, jpeg, svg, png, gif, webp
Font formats: woff2, woff, eot, ttf, otf

Add any other image or font format

Step 1: open webpack.shared.js which is located in the root folder
Step 2: find test: /\.(jpg|jpeg|png|gif|svg|webp|woff|woff2|eot|ttf|otf)$/i
Step 4: include the new file/format extension in this list seperated by a pipe character
Step 5: open module.d.ts which is located in the src folder
Step 6: add declare module '*.your-file-extension'; at the end of the file.