This is webpack v2 lab
-
create src with base project
-
install webpack globally via "npm i -g webpack"
-
create simple webpack config
-
run npm init to create package.json (it's need to save modules locally and store its dependencies).
-
install webpack locally to use it internal plugins
- npm install webpack --save-dev
-
install external libs for webpack
- npm install webpack-dev-server --save-dev
- npm install typescript awesome-typescript-loader --save-dev
- npm install css-loader sass-loader sass style-loader css-loader tslint --save-dev
Now we could you webpack-dev-server
Use npm run build:dev - for build dev bundle
Use npm run build:prod - for build prod bundle
Use npn run lint - for linting Typescript
Use npm run app - for run webpack dev server