如何使用webpack设置角度4

Jac*_*527 8 angular

当我创建角项目(NG新的项目名称),它会自动建立inline.bundle.js,main.bundle.js,polyfills.bundle.js,styles.bundle.js,vender.bundle.js在蒸馏水文件夹中.我可以dist/index.js在后端使用.所以我的问题是"Ng4自动构建webpack?"

Ric*_*ick 13

当您使用angular-cli创建角度2项目时,项目将使用webpack自动构建.

Angular-cli不久前从systemjs变为webpack.

如果要获取webpack配置文件,可以使用ng eject.

https://github.com/angular/angular-cli/wiki/eject

根据评论进行编辑:

您的角度项目中不依赖于webpack,因为angular/cli依赖于webpack并将为您安装webpack.如果检查node_modules文件夹,您将看到webpack存在.