npm install
to install all the repo dependencies.npm run start
to start the app. This script deletes Webpack generateddist/
folder and then uses Webpack to regenerate it again.
The project will start running on port 9000. If you want to change the port
open webpack.config.js
and find the port:9000
and change it from there.
module.exports = {
...
devServer: {
static: {
directory: path.join(__dirname, "dist"),
},
compress: true,
port:9000
}
}
npm run test
if you want to run one test.npm run test-watch
if you want to keep running the tests.
ts-loader
usestsc
, the TypeScript compiler, and relies on yourtsconfig.json
configuration. Make sure to avoid setting module to "CommonJS", or webpack won't be able to tree-shake your code.- Read more about
ts-loader
here