FAST_REFRESH=true causes compilation error (Webpack 5 support)
See original GitHub issueDescribe the bug FAST_REFRESH=true causes compilation error. Same as if I would configure .storybook/main.js or add plugin manually into config.plugins.
To Reproduce Steps to reproduce the behavior:
- Default config
FAST_REFRESH=true start-storybook
The same project builds successfully with webpack & @pmmmwh/react-refresh-webpack-plugin. The same storybook compiles without FAST_REFRESH=true
yarn run v1.22.10
$ FAST_REFRESH=true start-storybook
info @storybook/react v6.1.15
info => Using prebuilt manager
info => Loading presets
info => Loading 1 config file in "./.storybook"
info => Loading 7 other files in "./.storybook"
info => Adding stories defined in ".storybook/main.js"
info => Using React fast refresh
info => Using default Webpack setup
0% compilingERR! TypeError: Cannot read property 'tap' of undefined
ERR! at /Users/dan/github/project/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/index.js:236:65
Expected behavior Succesful compilation
System
Environment Info:
System:
OS: macOS 11.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 13.8.0 - ~/.nvm/versions/node/v13.8.0/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v13.8.0/bin/yarn
npm: 6.13.6 - ~/.nvm/versions/node/v13.8.0/bin/npm
Browsers:
Chrome: 88.0.4324.96
Firefox: 84.0.2
Safari: 14.0.2
npmPackages:
@storybook/addon-actions: ^6.1.15 => 6.1.15
@storybook/addon-essentials: ^6.1.15 => 6.1.15
@storybook/addon-links: ^6.1.15 => 6.1.15
@storybook/react: ^6.1.15 => 6.1.15
Packages:
"react-refresh": "^0.9.0",
"webpack": "^5.18.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:21 (7 by maintainers)
Top Results From Across the Web
Webpack 5 release (2020-10-10)
Webpack 5 has now native support for modules representing assets. ... This caused much stderr output and yielded a performance problem on ...
Read more >Webpack-dev-server compiles files but does not refresh or ...
vue file it causes webpack to recompile), but: The browser never refreshes; The compiled javascript that gets stored in memory is never made ......
Read more >ts-loader - npm
Failing the build on TypeScript compilation error. The build should fail on TypeScript compilation errors as of webpack 2. If for some reason...
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
@timkindberg going to beta this week, final in about a month (knock wood)
@shilman It works for us too with
6.4.0-alpha.25
, many thanks!