webpack, introduction vue runtime-only and runtime-compiler

After the introduction of Vue, we found incorrect report

 

 

 

 

 

It means to say that the current runtime-only template does not compile, here we need to use the runtime-compiler, using a runtime-only use is vue.runtime.js file, not compile the template, you need to be modified to use the runtime-compiler (vue .esm.js file)

 Option One: The easiest modification, developed to directly modify file

 

Option Two: Add an alias configuration in webpack, so that it runs the specified file

 

 

Here we must note 'Vue $' not just to write, it refers to the name of your custom Vue, which is used when importing names because Vue exported using export default so here you can customize the name. 'Custom name $' is the meaning

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/zhouzhiqin/p/12017145.html