小编Day*_*yze的帖子

VueJS 的 WebPack encore 配置

当我从带有 VueJS 的基本 symfony 应用程序和 symfony 提供的 Webpack encore 包加载页面时出现以下错误

[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

所以我需要将 VueJS 的别名更改为 webpack:

resolve: {
  alias: {
    vue: 'vue/dist/vue.js'
  }
}
Run Code Online (Sandbox Code Playgroud)

但是我没有在 Webpack Encore 中找到任何可以更改此设置的内容。

Webpack Encore:http ://symfony.com/doc/current/frontend.html

symfony webpack vue.js webpack-encore

1
推荐指数
1
解决办法
1200
查看次数

标签 统计

symfony ×1

vue.js ×1

webpack ×1

webpack-encore ×1