-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
featureIssue that requests a new featureIssue that requests a new feature
Description
Hello, there are not enough extensions to develop on the webpack. Our team developed a utility for redefining plug-ins (working with .angular-cli.json) and a convenient addition for Angular:
https://github.com/Angular-RU/angular-cli-webpack
What do you think if angular-cli out of the box had the opportunity and could you give us this?
package.json
"start": "ng serve --webpack-config ngw.config.ts" # it works with .angular-cli.json
terminal
$ npm start
ngw.config.ts
import * as webpack from 'webpack';
import { WebpackConfigOptions as ConfigOptions } from '@angular/cli/models/webpack-config';
import { BuildOptions } from '@angular/cli/models/build-options';
export type Configuration = webpack.Configuration;
const DEFAULT_COMMAND = process.argv[2];
export default function (config: Configuration, options: ConfigOptions<BuildOptions>, argv) {
const command = argv || DEFAULT_COMMAND;
//common config modification
...
switch(options.buildOptions.enviroment) {
case 'prod':
config = productionModificationsMerge(config);
break;
case 'dev':
//etc
}
return config;
}
Bug Report or Feature Request (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [x] feature request
splincode, DorianGrey, coilysiren, infogulch, Haykaran and 7 more
Metadata
Metadata
Assignees
Labels
featureIssue that requests a new featureIssue that requests a new feature