React throw error after upgrade from umi3 to umi4 (looking for help) #10370
Unanswered
maidangzhu
asked this question in
Q&A
Replies: 1 comment 1 reply
-
export default defineConfig({
// dynamicImport: {},
model: {},
antd: {},
request: {},
initialState: {},
access: {},
targets:{},
historyWithQuery:{},
title: "模板加",
alias: {
"@": path.resolve(__dirname, "../src"),
utils: path.resolve(__dirname, "../src/utils"),
styles: path.resolve(__dirname, "../src/styles"),
assets: path.resolve(__dirname, "../src/assets"),
components: path.resolve(__dirname, "../src/components"),
services: path.resolve(__dirname, "../src/services"),
},
chainWebpack(memo) {
- memo.module
- .rule("mp4")
- .test(/\.(mp4|mp3)(\?.*)?$/)
- .use(https://github.com/webpack-contrib/file-loader)
- .loader(require.resolve("file-loader"))
- .options({
- name: "static/[name].[hash:8].[ext]",
- esModule: false,
- });
},
hash: true,
dva: {},
theme: {
"@primary-color": "#171436",
},
routes: router,
fastRefresh: true,
plugins: [],
deadCode: {},
mfsu: {},
}); 这部分删了看看,还不行的话提供一个最小复现。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
命令行看起来是正常的,但是控制台报了很多react相关的错误,请问与我的配置或者版本有关系吗?
config file:
package.json file:
Beta Was this translation helpful? Give feedback.
All reactions