A starter frontend web project with an opionated default configuration.
- git
- node.js >= 8
Clone:
git clone [email protected]:rencire/ts-web-app-starter.git
Start development server:
npm start
Build files for production:
npm build
- Typescript. Because you want types :).
- CSS Modules.
- Gracefully transpile es6/es2015+ code
- Main bundle served to es6/es2015 compliant browsers.
- Create fallback bundle for non-supported browsers.
- Tree-Shaking.
- Fast dev server.
Now just add your own javascript framework/lib flavor of the month, and you're all set!
- add babel, so we can include babel-preset-env. (wait for @babel/preset-env to be out of beta)
- Create legacy webpack prod config
- Add
stylelint-webpack-plugin
once stable for webpack 4:https://github.com/JaKXz/stylelint-webpack-plugin/issues/137
- Move links/docs to config code itself
- HMR not working
- Consider replacing
lint-staged
withhttps://github.com/nrwl/precise-commits
once its more stable.
Why use Babel instead of just tsc
? We want to take advantage of @babel/preset-env
to auto polyfill for us.
Official Starter for integrating Typescript with Babel https://github.com/Microsoft/TypeScript-Babel-Starter#readme
babel loader for webpack https://github.com/babel/babel-loader
@babel/core https://github.com/babel/babel/tree/master/packages/babel-core
@babel/preset-env https://github.com/babel/babel/tree/master/packages/babel-preset-env
@babel/preset-typescript https://github.com/babel/babel/tree/master/packages/babel-preset-typescript
Some extra proposals: