Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bazel flag for enabling/disabling conversion from CommonJS to AMD step. #177

Closed
pbsf opened this issue May 22, 2019 · 2 comments · Fixed by #185
Closed

Add a bazel flag for enabling/disabling conversion from CommonJS to AMD step. #177

pbsf opened this issue May 22, 2019 · 2 comments · Fixed by #185

Comments

@pbsf
Copy link

pbsf commented May 22, 2019

I think it would be interesting to have a flag for enabling/disabling the conversion from the generated CommonJS code to AMD. On my project I'm currently using a copy of the defs.bzl file, removing the call to _convert_js_files_to_amd_modules for this plugin to work for a React Native scenario.

Thoughts?

@pbsf pbsf changed the title Flag for enabling/disabling conversion from JS to AMD step. Add a bazel flag for enabling/disabling conversion from JS to AMD step. May 22, 2019
@pbsf pbsf changed the title Add a bazel flag for enabling/disabling conversion from JS to AMD step. Add a bazel flag for enabling/disabling conversion from CommonJS to AMD step. May 24, 2019
@mattem
Copy link

mattem commented May 27, 2019

I'm after something similar, as we need to take the generated protos into rollup_bundle.
I don't think a flag is the correct approach here though, as it's normally down to the downstream rule to request the right output (AMD, es6 etc) rather than the user passing in a flag.

I've been experimenting producing both es5 and es6 sources, instead of setting the es5 output to both:

es5_sources = es5_js_outputs + aspect_data.deps_js,
es6_sources = es6_js_outputs + aspect_data.deps_js,

@Dig-Doug
Copy link
Contributor

I ran into the rollup_bundle problem as well today so took a stab at fixing the es6 output in #185.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants