天天看點

You are using the runtime-only build of Vue where the template compiler is not available

Vue Error:You are using the runtime-only build of Vue where the template compiler is not available

解決方案

webpack.config.js

中配置:

module.exports = {
	// ...
	resolve: {
        "extensions": ['.ts', '.js', '.json', '.css'],
        alias: {
            vue$: "vue/dist/vue.esm.js",	// 增加這個說明
        }
    },
	// ...
}
           

增加上述别名的那句話就好了。

vue