You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to use Next.js webpack 5 bundled version in a non-Next application (Storybook).
I need this to allow further development of @next/plugin-storybook, within the following demo application that relies on it: https://github.com/lbke/next-plugin-storybook-demo.
I experience conflicts, because Storybook will install its own version but Next and thus @next/plugin-storybook will rely on their own homemade bundle.
Describe the solution you'd like
Expose Webpack 5 bundle5.js file in Next, for instance as a package, so that it can be used instead of Webpack in end-user application.
Also, I am not sure how I could alias this package, so that webpack is replaced by next/webpack basically (since it's webpack itself, I am not sure I can use a Webpack alias as usual).
Describe alternatives you've considered
Using Yalc to avoid any issue with linking, then copy pasting bundle5.js into node_modules/webpack/lib/index.js, the hard way.
It leads to _webpack.DefinePlugin is not a constructor.
Describe the feature you'd like to request
I need to use Next.js webpack 5 bundled version in a non-Next application (Storybook).
I need this to allow further development of
@next/plugin-storybook
, within the following demo application that relies on it: https://github.com/lbke/next-plugin-storybook-demo.I experience conflicts, because Storybook will install its own version but Next and thus
@next/plugin-storybook
will rely on their own homemade bundle.Describe the solution you'd like
Expose Webpack 5
bundle5.js
file in Next, for instance as a package, so that it can be used instead of Webpack in end-user application.Also, I am not sure how I could alias this package, so that
webpack
is replaced bynext/webpack
basically (since it's webpack itself, I am not sure I can use a Webpack alias as usual).Describe alternatives you've considered
Using Yalc to avoid any issue with linking, then copy pasting
bundle5.js
intonode_modules/webpack/lib/index.js
, the hard way.It leads to
_webpack.DefinePlugin is not a constructor
.Reproduction and documentation here: https://github.com/lbke/next-plugin-storybook-demo
The text was updated successfully, but these errors were encountered: