Use with create-react-app for Typescript React App.
WARNNING: This package has only been used on my personal projects, that said it doesn't have proper releasing and documentations. Welcome to play around and let me know what you think that can be done better!
There are better options, such as react-scripts-ts.
Create React App with configs in this fork:
npm install -g create-react-app
create-react-app my-app --scripts-version=zc-react-scripts
cs my-app/
npm start
To update the configs to latest version:
npm update zc-react-scripts
We intended to minimize changes against the original repository, however there are features we would like to have but not provided. Also some Typescript related features.
We have added postcss-cssnext webpack plugin to support the latest CSS syntax, and the type definition of the CSS modules will be generated by typed-css-modules with a simple webpack loader.
You may notice that we added a step to the build pipeline that generates the CSS module type definitions before invoking webpack, where this looks like a duplicate step with the webpack loader. This is because webpack will feed the loaded files to each loader, which does not contains any of the CSS modules' type definitions as they will be generated by the loader.