npx @twinklecube/create-react-app my-react-app
or install in the current folder
npx @twinklecube/create-react-app .
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
- css
- css modules
- sass/scss
- sass/scss modules
- less
- less modules
install
npm i styled-components
or
npm i @emotion/styled
and use as usual
Image formats: jpg, jpeg, svg, png, gif, webp
Font formats: woff2, woff, eot, ttf, otf
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.