cli4升级到cli5运行内存溢出 #13750
Unanswered
web-laoxie
asked this question in
Help/Questions
cli4升级到cli5运行内存溢出
#13750
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
最近想将一个老项目vue2+cli4的项目升级到cli5,因为老项目的打包和运行速度较慢,想用webpack5进行优化速度。但是当我在使用vue create建立一个空项目,然后再把老代码迁移进去就会导致运行的时候内存溢出,而且运行的日志也看不到具体在哪里卡住了,求教大佬们

下面是vueconfig.js:
`const { defineConfig } = require("@vue/cli-service");
const path = require("path");
const resolve = dir => path.join(__dirname, dir);
var FriendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin");
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
client: {
logging: 'info',
overlay: {
errors: true,
warnings: true
}
}
},
chainWebpack: (config) => {
config.resolve.alias
.set("@views", resolve("src/views"))
.set("@assets", resolve("src/assets"))
.set("@api", resolve("src/api"))
});
`
Beta Was this translation helpful? Give feedback.
All reactions