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

Webpack 5 compatibility #2

Closed
Jack-Works opened this issue Sep 25, 2020 · 10 comments · Fixed by #8
Closed

Webpack 5 compatibility #2

Jack-Works opened this issue Sep 25, 2020 · 10 comments · Fixed by #8

Comments

@Jack-Works
Copy link
Member

This library depends on webpack/lib/FunctionModulePlugin but it is removed in Webpack 5

@crimx
Copy link
Member

crimx commented Sep 25, 2020

The code of the custom target is based on "web" target in Webpack 4 which is the Webpack version that Neutrinojs is depending.

@crimx
Copy link
Member

crimx commented Sep 25, 2020

Once Webpack 5 is mature enough and is wildly adopted by Neutrino presets the code should change accordingly.

@Jack-Works
Copy link
Member Author

hi, @crimx webpack 5 has released!

@crimx
Copy link
Member

crimx commented Oct 12, 2020

hi, @crimx webpack 5 has released!

Good to know! Would you like to make a PR? Since my projects are based on Neutrino which is still on 4, I am not in a hurry to upgrade to Webpack 5 until my next new project.

@Jack-Works
Copy link
Member Author

Ah I'm not familiar with webpack internal. Maybe I need to test if writeToDisk in webpack 5 still works

@A-gambit
Copy link

Hey @crimx. Do you have a plan to switch it to Webpack 5?

@crimx
Copy link
Member

crimx commented Nov 11, 2020

Not at the moment unfortunately. Still waiting for neutrinojs.

For browser extension development webpack 4 is more than enough though.

@A-gambit
Copy link

A-gambit commented Nov 11, 2020

Thank you for your quick answer.

But if we will think in the direction technology X is more than enough for something we will still use grunt for our codebase. Haha

Anyway, Webpack 5 gives a lot of improvements in tree-shacking which can be helpful.

@crimx
Copy link
Member

crimx commented Nov 12, 2020

But if we will think in the direction technology X is more than enough for something we will still use grunt for our codebase.

If it works well I don't see anything wrong with using grunt which is still a powerful tool.

Webpack 5 gives a lot of improvements in tree-shacking which can be helpful.

In browser extension bundle size has very little impact since they are loaded from the filesystem.

@Jack-Works
Copy link
Member Author

I like new new Worker("./x.js", import.meta.url) and new URL('./x.png', import.meta.url) support in Webpack 5, hope I can use it so it would be nice to upgrade to 5

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

Successfully merging a pull request may close this issue.

3 participants