Repository navigation
Add rollup-plugin-amd to rollup_bundle to support bundling *.ngfactory.js AMD files generated by ngc - #625
Merged
Conversation
Collaborator
Author
|
Needs a test before landing |
…y.js AMD files generated by ngc This is a workaround for the following issue angular/angular#29491
alexeagle
approved these changes
Mar 25, 2019
| */ | ||
|
|
||
| try { | ||
| require.resolve('shelljs'); |
Collaborator
There was a problem hiding this comment.
let's not add a shelljs dependency - we are making everyone who uses rules_nodejs download this, right? or at least anyone who loads from the rollup rule. We can probably just do this with node APIs
| // Part of work-around for Angular ngfactory issue https://github.com/angular/angular/issues/29491. | ||
| console.log( | ||
| '\n# patch: @buxlabs/amd-to-es6 to generate namespace imports instead of default imports'); | ||
| sed('-i', 'ImportDefaultSpecifier', 'ImportNamespaceSpecifier', |
Collaborator
There was a problem hiding this comment.
is there an issue filed for this, a PR against upstream, etc? how do we avoid needing to patch this in the future?
Collaborator
Author
There was a problem hiding this comment.
I'll ask about this in an issue for amd-plugin. We may be able to land this as a configuration option for the plugin but I don't think we can change the default behavior as that would break anyone using it.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a workaround for the following issue angular/angular#29491