build: merge webpack configurations (pro and dev) to define only once in angular.json
SuperITMan opened this issue · comments
Alexis Georges commented
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem
Current behavior
Need to define webpack configurations twice in "angular.json" file:
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"showcase": {
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./node_modules/@nationalbankbelgium/stark-build/config/webpack-partial.dev.js",
// ...
}
"configurations": {
"customWebpackConfig": {
"path": "./node_modules/@nationalbankbelgium/stark-build/config/webpack-partial.prod.js",
// ...
}
}
}
}
}
}
}
Expected behavior
As metadata is now improved after upgrade to ng8 (see: #2550), we can now have only one configuration for webpack.
That would allow us to define only once the webpack configuration in "angular.json":
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"showcase": {
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./node_modules/@nationalbankbelgium/stark-build/config/webpack.config.js",
// ...
}
}
}
}
}
}
}
What is the motivation / use case for changing the behavior?
Simplify and improve