webpack-typescript-boilerplate
v1.1.1
Published
Webpack configuration for typescript development
Downloads
37
Maintainers
Readme
Webpack typescript boilerplate
1. Install:
npm i webpack-typescript-boilerplate -D
2. Copy config file from module:
cp node_modules/webpack-typescript-boilerplate/setup/webpack.config.js ./
3. Change config inside copied file according to these values:
entryPoints
- an array of ts files to bundle separatelysourceFolder
- folder forawesome-typescript-loader
to includeassetsFolder
- folder with all additional files (pictures, sounds, configs etc.) witch should be included to release buildHTMLTemplate
- main app index.html file templatetemplateParameters
- variables that you will use inside html file like this:<title><%= title %></title>
https
- run DevServer with https (by default it's off)port
- port number for local server (by default it will be 8080)
4. Put following values to scripts
block of your package.json
"dev": "cross-env NODE_ENV=development webpack-dev-server",
"build": "cross-env NODE_ENV=production webpack"
5. Use it:
Local server (https://localhost:8080)
npm run dev
Production build
npm run build