include webpack that is being used to the webpackFinal function
See original GitHub issueIs your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I’m always frustrated when […]
it would be nice if when modifying webpack to pass the instance of webpack that is being used in storybook as part of the second parameter to webpackFinal
so that you can destructure it to be something like:
webpackFinal: (config, { configType, webpack }) => {
....do stuff like webpack.DefinePlugin(...
return config;
}
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Are you able to assist to bring the feature to reality?**
yes, I can...
**Additional context**
Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Webpack - Storybook
You can customize Storybook's Webpack setup by providing a webpackFinal field in .storybook/main.js file. The value should be an async function that ...
Read more >All You Need to Know about Webpack in Examples - Medium
This article will cover all main ideas behind the webpack — module bundler. You will know how to configure webpack, add assets, add...
Read more >Custom Webpack Config - Storybook
You can customize Storybook's webpack setup by providing a webpack.config.js file exporting a webpack 4 compatible config exported as a commonjs module.
Read more >Webpack 5 and Storybook 6 integration throws an error in ...
Another small fix we had to do was to add this line in the storybook webpack.config.js file: config.resolve.fallback = { http: false, }....
Read more >A Guide to Managing Webpack Dependencies - Toptal
Finally, we discuss how to configure Webpack, if we want to include third-party ... For this purpose, we can use require.ensure or System.import...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gaurav5430 https://github.com/storybookjs/storybook/pull/15529/files
@ndelangen not sure I understand. It is common if you are overriding or adding to webpack to require webpack in this file. What can happen is you may end up with 2 different versions of webpack, and it can cause pretty cryptic error messages. So if you are say just adding a variable via define plugin, this won’t work if there are multiple versions of webpack. How would the code you suggested help folks to use the webpack that storybook is also using? Can you maybe expand that idea further?