Home > front end >  Uncaught ReferenceError: __VUE_HMR_RUNTIME__ is not defined
Uncaught ReferenceError: __VUE_HMR_RUNTIME__ is not defined

Time:12-25

This problem should be how to solve?
I use @ vue/cli4.5.9 built a SPA (single page application), vue2, environment building, in vue. Config. Js configuration is as follows:
 
Const CompressionWebpackPlugin=the require (' compression will - webpack - plugin)
Const path=the require (" path ");
Const proxyUrl='https://www.baidu.com/'//access interface corresponding to the domain name

The function resolve (dir) {
Return path. Join (__dirname, dir)
}

The module. Exports={
DevServer: {
Port: 8080,
Progress: true,
Open: true,
Host: '0.0.0.0'
HotOnly: false,
//set the reverse proxy
Proxy: {
'/API: {
Target: proxyUrl,
ChangeOrigin: true,
PathRewrite: {
'^/API' : '
}
},
'/login' : {
Target: proxyUrl,
ChangeOrigin: true,
PathRewrite: {
'^/login' : '
}
},
},
},
LintOnSave: 'warning',
ConfigureWebpack: config=& gt; {
If (process. The env. NODE_ENV==='production') {
//production environment
The config. Plugins. Push (
New CompressionWebpackPlugin ({
//asset: '[path]. Gz [query]',
Algorithm: gzip,
Test: the new RegExp (' \ \. (' + productionGzipExtensions. Join (' | ') + ') $'),
Threshold: 10240,
MinRatio: 0.8
})
)
}
If (process. The env. NODE_ENV==='development') {
Config. Devtool='eval - source - map'
}
},
ChainWebpack (config)=& gt; {
//set the first parameter: alias set, a second parameter: set the path of the
The config. Resolve. Alias
Set (' @ ', resolve ('./SRC))
Set (' @ assets, resolve (' SRC/assets'))
Set (' @ components, resolve () './SRC/components')
Set (' @ pages, resolve () './SRC/pages')
},
PluginOptions: {
'style - resources - loader: {
PreProcessor: 'SCSS,
Injector: 'append',
Patterns: [path. Resolve (__dirname, './SRC/styles/util. SCSS ')]
}
}
}



Then the terminal execute the command: NPM run serve to start the project, will be an error, lead to white during the whole page, don't have access to, really drunk, this should be how to solve? Let me very meng! Error is as follows:

Uncaught ReferenceError: __VUE_HMR_RUNTIME__ is not defined
  • Related