-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support webpack@5 #86
base: develop
Are you sure you want to change the base?
Conversation
@Austaras when you've got a moment - can you rebase / re-commit / etc so that all the offline mirror changes are on their own in the first commit? Makes it easier to look at the actual code changes from GH. If you haven't done this before, you can do a |
Sure, but I will be pretty occupied for a week or two. |
@Austaras thanks, no rush! |
d2ad7ab
to
4498308
Compare
I've reorganized commits, there're still multiple places where I have absolute no idea how to deal with though |
Well, I tried to finish this before 2021 begins, but it seems to be unlikely to happen. Also due to sheer amount of code involved, I don't believe it's possible to support both webpack 4 & 5, so maybe this pr should be release with a new major version? |
@DanielSchaffer what does this this actually do? It doesn't seem to have any effect in every example |
@Austaras Unfortunately, I don't 100% recall why I did that. It may have something to do with the way the relative URL paths need to be set up with the dev server for each of the examples, particularly making sure they work the same way when there is only one example being run vs multiple. It's also entirely possible I was using the spaghetti + wall approach trying to debug something and forgot to remove it. That config is just for running the examples though, not for any real world build or reference. |
Aplogize in advance if you're refering to the deleted comment about However I do want to know what |
No worries! RE supporting both versions: I'm not opposed to setting up a maintenance branch for 4.x, but I'm a little wary of the administrative overhead for managing that. Are you aware of any stats regarding the adoption rate of v5? Would it be easier to manage side-by-side support with abstractions rather than inline conditionals? For example:
vs
The abstraction would definitely help keep the code paths clearer, and would also make it easier to (at some point in the probably very distant future) drop support for v4 completely. RE |
For two branch: inline conditional is impossible because there will be likely two dozens of places needed to be patched, and although side-by-side support is possible, making TypeScript satisfied right is hard. Providing two version would be the most easy solution, but a putting legacy code into its own folder like For |
Can you elaborate on this? Using an abstraction like I described above would ideally remove the need for complicated union types (e.g.
This is inaccurate - while it is true of the default settings, it is possible to configure the plugin options so that both targets tag their assets (e.g. |
The bigger problem is typing of webpack. Webpack 5 has its offical typing and has changed radically from webpack 4, so it's a lot of work to update the old webpack type definition. I don't know if it's possible for serperate files to refer to different webpack typing |
@DanielSchaffer what the purpose of this? I cannot figure out what it does and it really hard to find an alternative since |
@Austaras had to look that one up - that all has to do with working around an issue with Safari: f8b1a40#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R101 |
Oh I know, you're hooking into webpack's runtime to prevent multpile code being all excuted. However this is questionable because Maybe we could ignore it for now and fix it later? |
Yeah, this feels like something that would probably need to be re-solved separately. IIRC it's also fixed in later versions of Safari, and 10.1 is coming up on 4 years and I can't find any global/national browser usage statistics that even list it, let alone showing any significant usage. |
Anyway, this is done |
@DanielSchaffer could you take some time to review this? It's a huge patch, but changes are mainly in |
can i help with something here? |
When will this be merged? |
fixes #50
current status: