please release babel files as @ngtools/babel
See original GitHub issueWith build-optimizer being deprecated now, having to install @angular-devkit/build-angular with a rather chunky dependency tree - nearly all depedencies pinned to a specific version - is unfortunate.
Do you plan to release https://github.com/angular/angular-cli/tree/master/packages/angular_devkit/build_angular/src/babel as @ngtools/babel
just like @ngtools/webpack
? Or as @angular-devkit/build-babel
in the vein of @angular-devkit/build-webpack
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Babel CLI
Babel comes with a built-in CLI which can be used to compile files from the command line.
Read more >babel/polyfill
Available from the dist/polyfill.js file within a @babel/polyfill npm release. This needs to be included before all your compiled Babel code.
Read more >Config Files - Babel.js
File -relative configuration. Babel loads .babelrc.json files, or an equivalent one using the supported extensions, by searching up the directory structure ...
Read more >Configure Babel
Create a file called .babelrc.json with the following content in your project. { "presets": [...], "plugins ...
Read more >FAQ - Babel.js
Please see babel/rfcs#5, google/traceur-compiler#1773 and babel/babel#838 for more ... config file to get all the same transforms that were in Babel 5:
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
Hi @sod,
@angular-devkit/build-optimizer
is not really considered a public API. It’s experimental on NPM (not yet1.0.0
) and is effectively an implementation detail of the Angular CLI. The extra package wasn’t really necessary, so we folded it into@angular-devkit/build-angular
since the only supported usage is through the CLI itself. Refactoring this directory out of@angular-devkit/build-angular
and into another package is just making it easier for users to depend on private implementation details which could change in the future.If users really want to depend on these private APIs anyways, they can deep import from
@angular-devkit/build-angular
. The package is bigger than it needs to be for that purpose as you mentioned, but that is the nature of leveraging private APIs. Even then, we may end up adding Node.jsexports
in the future, which could break deep imports as well. The most maintainable solution would probably involve forking the repository and deleting the unnecessary pieces or vendoring the NPM package and altering it to meet your needs.I think the more important question is about your actual use case. Is there something in particular you’re trying to do that requires this package? Problems like optimizing Angular output for production builds are exactly the kind of things the CLI is intended to solve. Is there a reason you can’t use the CLI and need to directly leverage these private APIs?
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.