webpack.config.js not found even if customWebpackConfig is not set
See original GitHub issueDescribe the bug
I just want to merge extra webpack config for production build. So I only config the production options, but for development build, it runs into errors: webpack.config.js not found
Builder:
Libraries
angular-devkit/build-angular
: 0.12.3
Expect Ignore when customWebpackConfig is not set
Additional context My angular.json config is like
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"outputPath": "dist/mall/browser",
"index": "projects/mall/src/index.html",
"main": "projects/mall/src/main.ts",
"polyfills": "projects/mall/src/polyfills.ts",
"tsConfig": "projects/mall/tsconfig.app.json",
"sourceMap": true,
"assets": [
"projects/mall/src/favicon.ico",
"projects/mall/src/assets"
],
"styles": [
"projects/mall/src/styles.scss"
],
"scripts": [],
"statsJson": true
},
"configurations": {
"production": {
"customWebpackConfig": {
"path": "extra-webpack.config.js",
"mergeStrategies": { "devtool": "replace" }
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
webpack.config.js not found even if customWebpackConfig is ...
Describe the bug I just want to merge extra webpack config for production build. So I only config the production options, ...
Read more >customWebpackConfig not working in ng build --prod in Angular
So I added to my angular.json : "build": { "builder": "angular-cli-builders:custom-webpack- ...
Read more >How To Use Custom webpack Configurations with Angular ...
Learn how to create a custom webpack config inside an Angular project using CLI Builders. This example will reduce the file size of...
Read more >Externals - webpack
The externals configuration option provides a way of excluding dependencies from the output bundles. Instead, the created bundle relies on that dependency ...
Read more >Webpack Plugin — JSDefender User Guide 2.6
As a result, JSDefender will not be able to use your inline protection settings. ... The following webpack.config.js code snippet utilizes the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, indeed a use case that I missed. You’re welcome to PR (it’s just adding a default value in schema).
Meanwhile the workaround is to create an empty config for development and specify it in options.
Tried. it works. thanks