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

Feature request: disable CommonJS / ES5 / lib build #285

Closed
treshugart opened this issue Mar 24, 2017 · 3 comments
Closed

Feature request: disable CommonJS / ES5 / lib build #285

treshugart opened this issue Mar 24, 2017 · 3 comments

Comments

@treshugart
Copy link
Contributor

treshugart commented Mar 24, 2017

Currently we only have a use case for using the UMD build. We want to disable building lib for a few reasons:

  • It speeds up our builds by a wide margin (70+ components in a Lerna mono-repo)
  • We currently use loaders, which makes exposing es / lib a problem for consumers because they must know about the implementation details.
  • We point main to the umd bundles to get around ^, therefore we don't want to incur the overhead of es / lib at the moment.
  • We do want to get rid of umd in the future and only use es / lib but that requires a lot of work to get rid of the loaders.

What I am proposing, in the form of a PR, is:

  • Allow an npm.cjs option to be specified as false to switch off the CommonJS build

This means that even though it's a new feature, it's not a breaking change as the lib build will still be generated by default (opt-out).

treshugart added a commit to treshugart/nwb that referenced this issue Mar 24, 2017
@treshugart treshugart changed the title Disable CommonJS / ES5 / lib build Feature request: disable CommonJS / ES5 / lib build Mar 24, 2017
@treshugart
Copy link
Contributor Author

Implemented in fork while awaiting PR: https://www.npmjs.com/package/@treshugart/nwb.

insin added a commit that referenced this issue May 9, 2017
#285 - feat: allow CommonJS builds to disabled
@treshugart
Copy link
Contributor Author

Closing because PR was merged. Thank you!

@insin
Copy link
Owner

insin commented May 9, 2017

Thanks for the PRs, aiming to cut a release of whatever's in master on Thursday morning (AEST)

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

No branches or pull requests

2 participants