Comments (7)
Couldn't you just add the extraWebpackConfig
option to your options array in angular.json for your various builds?
"architect": {
"build": {
"builder": "ngx-build-plus:build",
"options": {
"outputPath": "dist",
...
"extraWebpackConfig": "webpack.extra.js"
}
}
}
I have it defined for both "build" and "serve", and ng build
/ng serve
pull in the extra webpack config as expected.
from ngx-build-plus.
Thanks for this feedback. Currently, I don't have such a plan. IMHO it's also possible that one wants different webpack.config files for different tasks (e. g. build and serve).
from ngx-build-plus.
Fair enough. I think both use-cases make sense, but I understand your position. Many thanks for getting back!
from ngx-build-plus.
I think this should be re-opened. The point of Angular.json is to configure the project, which includes configuring webpack. The point of ngx-build-plus is to allow us to configure webpack more granularly. Such granular configuration is generally pretty fundamental, so it would be advantageous to define it as part of the core configuration rather than as an option (i.e. a flag than can easily be accidentally left out).
from ngx-build-plus.
That's awesome, @jcoutch!
I have a desire similar to the OP. I'm pretty new to Angular CLI configuration, but if this is a valid technique then I think that solves it, @manfredsteyer!
from ngx-build-plus.
Thanks @jcoutch,
I didn't realise it needed to be in both build and serve.
Cheers,
Ben
from ngx-build-plus.
BTW, the other tool for customizing webpack configs under Angular CLI:
https://github.com/just-jeb/angular-builders/tree/master/packages/custom-webpack
takes the approach described above: an entry in angular.json to point to the extra webpack config.
(There are many other differences of course, but this one seems like it should be adopted from there over to here.)
from ngx-build-plus.
Related Issues (20)
- lazy elements module keep loading the MFE in an infinite loop.
- Automatically page refreshing on Angular webcomponent
- Angular hot load server is having very poor performance
- i'm facing this issue
- no able to update to 15
- Can't add to library - expected node expected node projects/foo/architect/serve in angular.json HOT 2
- Externals schematics references non existend files (*.umd.js) HOT 1
- How does environment variable injection work in ssr? Please provide docs HOT 1
- Unable to serve language files with MFE.
- Unable to run additional webpack configurations in NX workspace HOT 3
- Angular 17 support HOT 3
- New esbuild builder support HOT 1
- ngx-build-plus and the new build system @angular-devkit/build-angular:application
- What are the differences between this package and `@angular-devkit/build-webpack`?
- Update this repo with the lates please so old
- Extra configuration possibilities for Native Module Federation with Angular HOT 2
- Unable to build Angular 17 PWA fails with Data path "/serviceWorker" must be boolean
- Data path "" must have required property 'main'. Angular 17 (maybe sinceAngular 16?)
- No more provideExperimentalZonelessChangeDetection in Angular 18.0.1
- yarn add ngx-build-plus not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-build-plus.