-
Notifications
You must be signed in to change notification settings - Fork 305
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
build using webpack #1828
base: master
Are you sure you want to change the base?
build using webpack #1828
Conversation
Here's the diff after moving to src which makes more sense for online browsing: https://github.com/openstyles/stylus/pull/1828/files/b4aa1c4d4a2b13ff778dcf16f7b1e57591787394..HEAD |
I have never used webpack either so I can only tell from my rollup experience:
Here are some examples using rollup:
|
Great stuff, thanks.
I had to split the worker scripts manually into separate compilation items in webpack (previously did the same in rollup) to reuse the code, but comlink should greatly simplify it, thanks. The content script is intentionally a single bundle because only ~600 bytes for
Dunno yet, I forgot to finish my investigation about it. I'll probably remove it, if the extra |
Seems to work, but I didn't test everything, so I plan to publish it only into beta for a while. Editor/manager now open slightly faster, as expected, due to bundling and minifying dozens of scripts.
Todo:
@eight04, now the source code is using modern conventions (more or less), so it's easier to work with, especially in nontrivial ways. I'll be primarily working on MV3 (arguably using conditional compilation, I don't know yet), so maybe you could take a look at this PR as a whole and advise or participate. Since I don't have a lot of experience in tooling, there's probably a lot to improve. BTW I've tried rollup and although it produced nice ES modules, I still switched to webpack because it's much more flexible at about the same speed. Regarding all those WIP commits, I won't merge them, I'll rebase/regroup everything or just squash it in one commit later.