@angular-devkit/build-angular:browser - Ability to build app as a single bundle
See original GitHub issueš Feature request
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Description
Ability to build app as a single bundle.
Describe the solution youād like
angular.json: projects -> āproject-nameā -> architect -> build -> Configuration: (new Options to bundling the js as single output)
. .
"architect": {
"build": {
"options": {
"scripts": [
{
"input": "custom-script1.js",
"bundleName": "my-custom-script1"
},
{
"input": "custom-script2.js",
"bundleName": "my-custom-script2"
}
]
},
"configuration" : {
"production" : {
"singleBundle": {
"path": "dist/project-name/"
"name": "single-bundle" <<---<<< // Single js bundle contains (runtime.js, main.js, polyfills.js, custom-script1.js, custom-script2.js)
}
}
}
}
. . .
Usage:
ng build project-name
Output expected:
- Dist folder
dist/single-bundle.js dist/runtime.js dist/main.js dist/polyfill.js index.html . . .
- Index.html to include the
single-bundle.js
<script src="single-bundle.js" type="module"></script>
Describe alternatives youāve considered
- ngx-build-plus does provide the ability to build as a single file. It would be nice if angular devkit can provide this.
Issue Analytics
- State:
- Created a year ago
- Reactions:8
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Could not find the implementation for builder @angular-devkit ...
I got this working by reinstalling the build-angular package. Note the '--save-dev' flag on the install command:
Read more >Build Angular Like An Architect (Part 1) - DEV Community ā ā
In this tutorial we will take care of the mandatory steps 1 and 4, running the AOT compiler and optimizing a single bundle...
Read more >@angular-devkit/build-angular - npm
This package contains Architect builders used to build and test Angular applications and libraries. Builders. Name, Description. app-shellĀ ...
Read more >Angular CLI builders
To create a builder, use the createBuilder() CLI Builder function, ... the build command runs the builder @angular-devkit/build-angular:browser to performĀ ...
Read more >Customizing Angular CLI build - Just Jeb
Extending underlying Webpack config Ā· If you build a universal app and would like to modify your server build configuration use @angular-buildersĀ ...
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 Free
Top 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
Thank you for submitting your feature request! Looks like during the polling process it didnāt collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angularās scope, weād encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.