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

Migrate to Webpack 4 #3923

Closed
1 task done
rgbkrk opened this issue Mar 1, 2018 · 12 comments · Fixed by #4639
Closed
1 task done

Migrate to Webpack 4 #3923

rgbkrk opened this issue Mar 1, 2018 · 12 comments · Fixed by #4639
Assignees

Comments

@rgbkrk
Copy link
Contributor

rgbkrk commented Mar 1, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Context

We ❤️next.js! I made the (possibly) poor decision of migrating our (nteract's) monorepo to Webpack 4 only to notice that next.js is on webpack 3. How far off is a migration to webpack 4? My primary reason for asking is to know if I should switch us back to webpack 3 or just wait on the next next version. 😄

We have a few non-next.js apps (some loaded by a python server, one by electron) and we want to make the webpack similar using the universal webpack configurator plugins crafted for next 4. I don't want to break our next apps, so I kept those a bit separate.

@timneutkens
Copy link
Member

I have something in the works. No ETA though.

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Mar 6, 2018

Looks like webpack-dev-middleware just upgraded, which should help a lil' bit.

webpack/webpack-dev-middleware#267

@timneutkens timneutkens self-assigned this Mar 16, 2018
@krazyjakee
Copy link

If I'm going to start a new project, will it be hard to migrate from the current version of nextjs to a version using webpack 4?

@timneutkens
Copy link
Member

As long as you run the latest version of Next.js we're not going to break much.

@vzaidman
Copy link
Contributor

any progress on this? can i help? i recently migrated a big project to webpack 4.

@simonjoom
Copy link

simonjoom commented May 9, 2018

I just in progress to reload the project with web pack 4
I use it already , work good with last dev-middleware/hot middleware and some code adjustment,
Personnaly i removed the feature ondemand in this.. i adjusted hot-reload with the last
Soon will provide the link

@simonjoom
Copy link

simonjoom commented May 11, 2018

Here my work for webpack4 (i just did tested on browser only )

A little boilerplate using no babelified code of source nextJs inside with feature like hot-reload completely working with css,css and js

I changed a bit the core of nextjs to make all works .. i wait for any questions

https://github.com/simonjoom/NextJs4Reloaded

Please read
https://github.com/simonjoom/NextJs4Reloaded#feature-tested

#4332

@timneutkens
Copy link
Member

From my comment here: #4332 (comment)

As said on twitter I wouldn't recommend using this since it removes a lot of features / is not tested. But we can sure copy a few things.

Either way there's no need for an extra issue.

Duplicate of #3923

Thanks for sharing 🙏

@SindreSvendby
Copy link

SindreSvendby commented May 31, 2018

Hi

I see that there is not much activity i the add/webpack4 branch.

Since the release of webpack 4 , next.js v6 has been released without support for webpack 4, I assumes that is because it's a bit tricky or more work then expected to get webpack 4 to work with next.js?

Is there anything we as a community can do to help with this?

Are you able to outlines the steps that you guys want to take to get webpack 4 into next.js?
If we are able to break this into smallere pieces I'm sure more people will join in and help us get this done!

❤️ Great work on next! use it in so many apps! ❤️

@timneutkens
Copy link
Member

If we are able to break this into smallere pieces I'm sure more people will join in

The problem with Webpack 4 right now is that it requires a big refactor of certain parts of how Next works right now. I'll get onto that after #4496. As you can see in the "WIP" branch it's far from a simple yarn add webpack@4.

@rgbkrk
Copy link
Contributor Author

rgbkrk commented Jul 24, 2018

You all rock!

@jesstelford
Copy link
Contributor

It looks like Webpack 4 is included in 6.1.1-canary.3 🎉

@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants