vue 项目启动后一直不断的刷新停不下来

新建的vue 项目,配置了代理后项目一直刷新,停不下来,各种查找最后发现是vue.config.js 中的热更新配置项目开启的原因

const {
  defineConfig
} = require('@vue/cli-service')
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const {
  ElementPlusResolver
} = require('unplugin-vue-components/resolvers')
module.exports = defineConfig({
 ............................
    hot: false,
    liveReload: false
  },
  transpileDependencies: true,
  configureWebpack: {
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()]
      }),
      Components({
        resolvers: [ElementPlusResolver()]
      })
    ]
  }
})

把上面配置文件中的   

        hot: false,
        liveReload: false

改成false 就好了

你可能感兴趣的:(vue.js,前端,javascript)