Home >Web Front-end >Vue.js >What to do if vue.runtime.esm error occurs

What to do if vue.runtime.esm error occurs

coldplay.xixi
coldplay.xixiOriginal
2020-12-21 09:35:3710664browse

The [vue.runtime.esm] error occurs because the imported file does not export [module.exports]. The solution to the [vue.runtime.esm] error is to add relevant configurations to webpack. .

What to do if vue.runtime.esm error occurs

The operating environment of this tutorial: Windows 7 system, Vue version 2.9.6. This method is suitable for all brands of computers.

【Recommended related articles: vue.js

Vue reports an error after importing the file vue.runtime.esm.js?2b0e:619 [Vue warn ]: Error in render: "TypeError: Object(...) is not

The problem:

What to do if vue.runtime.esm error occurs

The imported file is not exportedmodule.exports

It can be solved by adding the following configuration in webpack:

module.export{
…
resolve:{
alias:{
‘vue$’:‘vue/dist/vue.js’
}
}
}

Related free learning recommendations: javascript learning Tutorial

The above is the detailed content of What to do if vue.runtime.esm error occurs. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to install vue.jsNext article:How to install vue.js