-
-
Notifications
You must be signed in to change notification settings - Fork 277
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 module
to package.json
#234
Conversation
Also, can you export a browser build that is itself an ES6 module (so one doesn't need to configure plugins and can just load in the browser)? |
This is probably easier to discuss if you submit a pull request showing what you would change, what it would enable, and show that it still supports current methods of usage. |
Ok, sure, thanks, will try to see as I have time... Btw, if I haven't shared before, my https://github.com/brettz9/regextras may suggest some benefits to adding to your available array extras (esp. |
Before going to the trouble, are you opposed to me in principle switching from browserify to Rollup to support an ES6 module distribution? Browserify still has this issue open browserify/browserify#1186 to support ES6 modules export, while Rollup has been working nicely for such exports for some time... |
I have no problem with switching to Rollup, but note that the files currently in EDIT: Just noticed you pushed 23bdcd4, and thought I'd add some feedback: Let's keep the |
@josephfrazier : ~~~Regarding Rollup of Node, yes, but there is babel-register which can process ES6 modules in place as Node.~~~ (Sorry, I see you mentioned As far as the PR, sure, I can separate them out. |
Btw, the package.json linter I am using mentioned a lack of |
Also, as implicit in the name "Rollup", the process tends to package all of the files together. Is there a compelling need for preserving all of those separate If so, can we at least move |
Thanks for the separate PR and the thought-provoking questions, it's nice to see such good contribution energy! I've tried to address the questions below:
I think we should start off with just adding a
I believe one case is where the user doesn't want all of the If the question is "Why continue providing ES5 at all?", my opinion is that we should continue to support Node users without requiring them to use EDIT: The three.js Rollup config may also be helpful: https://github.com/mrdoob/three.js/blob/ba4489ded66212ac9e6d3017a6bb856023bd026f/rollup.config.js
You can try it if you'd like, but since the Let me know if I've misunderstood anything or need to clarify something, thanks again! EDIT: I came across a somewhat related issue about packaging XRegExp, if you're interested: #182 |
Maybe you could take a look at master...brettz9:rollup ? This preserves the status quo as far as the existing directory structure (though if you don't mind a breaking change, we could get rid of However, for the sake of sanity in testing, I updated the current dependencies in this PR (and also added the |
Oh, and I can remove the |
Thanks, let's keep the structure as-is for now.
If you could make the dependency updates and
Yes, let's ignore the |
FWIW, besides making a new PR for the |
Perfect, thanks! Hopefully we can land that one soon |
Now that #241 is merged, if you could make a PR for your |
PR added at #243 |
Thanks, I'll close this in favor of #243, where the discussion continues. |
I think you want this in
package.json
for the sake of tools like Rollup optimizing builds.See https://stackoverflow.com/a/42817320/271577