Closed stefanprobst closed 3 years ago
Hello 👋
Thanks for the report! I guess if they removed the flag, it's because they are going to remove Webpack 4 support (I need to double check that), so this "isWepback5" would not be extremely useful.
Can you tell me more about your usecase?
apparently it's now a toplevel flag (i.e. not in future
anymore)
my usecase is just transpiling a package, and i wanted to try out the new next canary, which threw the error in the image above with next dev
.
I will add support for top-level webpack5
, should be quite trivial.
Should be fixed in 7.3.0 👍 no breaking change, everything should work out of the box
thanks!
for documentation: webpack5
needs to be explicitly set to true
(even though that's the default):
// next.config.js
const config = {
/** @ts-expect-error */
webpack5: true,
}
I will update the docs when it is official in a stable release :)
@martpie Webpack 5 now is the default in NextJS 11
Yep exactly, this is what I was waiting for, see #218 :)
Are you trying to transpile a local package or an npm package? n/a
Describe the bug In the current canary version 10.2.4-canary.9, next disallows the
future.webpack5
option innext.config.js
, which means i cannot tellnext-transpile-modules
to use webpack5, even though next is using it.Possible solution could be to allow programmatically passing a
webpack5?: boolean
option tonext-transpile-modules
, which will be checked here.To Reproduce
Expected behavior
Setup
next-transpile-modules
version:npm
/yarn
version:Additional context Add any other context about the problem here.