-
Notifications
You must be signed in to change notification settings - Fork 37
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
Allow to create multiple JS bundles #282
Comments
I agree this would be useful and currently there is no way how to handle this easily. However, wondering if it could work like that you could simply create different entry files Also I remember @jakub300 wanted to switch to https://rollupjs.org/, is there a better way in it to do this? |
So no configs with the files list because it somehow denies purpose and easy of use of bundlers / ES6 imports |
That would be even better with the imports ;). Would that work as well if I just write some JS within one of those files without any imports? |
It should but I think we would have to change structure of
So the files in the top directory would compile to their own bundles. The files in the By default there would be only This would allow some basic code splitting but it might be more complicated with revisions we make to the files. So waiting for @jakub300 if this makes sense or is there some better solution. |
Yep, was thinking about the same idea with components directory for the reusable modules. 👍 |
I like it, all top level files are entry points for browserify/rollup and rest of the files is in subdirectory. I would call it Regarding to browserify vs rollup I don't see much time difference. I would say that implementation of multiple entry points in either would take under a day. In case of rollup we would be migrating so overall it could take more than a day. |
Thanks, Jakub, |
Hi,
I came across this idea when I needed to create a custom JS file that I wanted to use in the WordPress admin area, but I think it might be beneficial for other use cases as well.
It would be nice to have an option to create multiple bundled files as on output of our JS task. I was thinking about a configuration, something like this:
If there's no configuration it'll work like it is at them moment.
Let me know what you think of this idea.
The text was updated successfully, but these errors were encountered: