gpt4 book ai didi

reactjs - 升级到 Webpack 5 打破 Storybook 5

转载 作者:行者123 更新时间:2023-12-03 13:31:36 26 4
gpt4 key购买 nike

在将 webpack 4/storybook 5 项目升级到 webpack 5 以希望利用联合模块的过程中。我有定期的webpack --config webpack.config.js构建工作需要一些努力,但我似乎无法克服这个故事书配置问题来让它工作。故事书 webpack.config.js 中没有太多内容 - 只是一些用于测试较少文件和使用适当加载器的模块规则。我在升级 webpack 专业时遇到的错误似乎很典型,因为我发现很多人从 3-4 遇到同样的事情,但到目前为止我尝试过的任何事情都失败了。具体的堆栈跟踪是:

Cannot read property 'tapAsync' of undefined
at ExternalModuleFactoryPlugin.apply (/Users/tbullard/Workspace/unify/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:29:39)
at compiler.hooks.compile.tap (/Users/tbullard/Workspace/unify/node_modules/webpack/lib/ExternalsPlugin.js:24:63)
at SyncHook.eval [as call] (eval at create (/Users/tbullard/Workspace/unify/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
at SyncHook.lazyCompileHook (/Users/tbullard/Workspace/unify/node_modules/tapable/lib/Hook.js:154:20)
at hooks.beforeCompile.callAsync.err (/Users/tbullard/Workspace/unify/node_modules/@storybook/core/node_modules/webpack/lib/Compiler.js:665:23)
at _err0 (eval at create (/Users/tbullard/Workspace/unify/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
at compiler.inputFileSystem.readFile (/Users/tbullard/Workspace/unify/node_modules/@storybook/core/node_modules/webpack/lib/DllReferencePlugin.js:72:15)
at process.nextTick (/Users/tbullard/Workspace/unify/node_modules/@storybook/core/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15)
at process._tickCallback (internal/process/next_tick.js:61:11)

让我相信有一个插件不兼容🤷🏻‍♂️ TIA!

最佳答案

Storybook 尚未准备好使用 网络包 5 但它在他们的roadmap for version 7.0上.

GitHub issue 中的更多上下文.

关于reactjs - 升级到 Webpack 5 打破 Storybook 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61375674/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com