Fas*_*ows 11 bundle reactjs webpack react-dom next.js
我设置了 webpack 分析器来查看我的包大小,我注意到 React-dom 被包含了两次。有谁知道这是为什么以及如何解决它?

这也是我的 package.json:
{
"name": "test",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"analyze": "cross-env ANALYZE=true next build"
},
"dependencies": {
"framer-motion": "^10.12.16",
"next": "^13.4.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@next/bundle-analyzer": "^13.4.6",
"autoprefixer": "^10.4.14",
"cross-env": "^7.0.3",
"postcss": "^8.4.24",
"tailwindcss": "^3.3.2"
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
539 次 |
| 最近记录: |