UNPKG

953 BMarkdownView Raw
1# Webpack Builder for Architect
2
3This package allows you to run Webpack and Webpack Dev Server using Architect.
4
5To use it on your Angular CLI app, follow these steps:
6
7- run `npm install @angular-devkit/build-webpack`.
8- create a webpack configuration.
9- add the following targets inside `angular.json`.
10```
11 "projects": {
12 "app": {
13 // ...
14 "architect": {
15 // ...
16 "build-webpack": {
17 "builder": "@angular-devkit/build-webpack:webpack",
18 "options": {
19 "webpackConfig": "webpack.config.js"
20 }
21 },
22 "serve-webpack": {
23 "builder": "@angular-devkit/build-webpack:webpack-dev-server",
24 "options": {
25 "webpackConfig": "webpack.config.js"
26 }
27 }
28 }
29```
30- run `ng run app:build-webpack` to build, and `ng run app:serve-webpack` to serve.
31
32All options, including `watch` and `stats`, are looked up inside the webpack configuration.
\No newline at end of file