[Question] How to utilize vue-runtime build?
See original GitHub issue- Laravel Mix Version: 1.3.0
- Node Version: 6.11.1
- NPM Version: 3.10.10
- OS: Linux
Description:
Vue comes with a runtime build which allows for CSP compliance.
Steps To Reproduce:
The following addition to the webpack.mix.js
allows mix
to use the runtime version:
mix.webpackConfig({
resolve: {
alias: {
'vue$': 'vue/dist/vue.runtime.js'
}
}
});
This compiles the resources find but does not work during runtime as the templates are not compiled to render functions. In the link above, it is suggested that webpack
+ vue-loader
can be used to pre-compile the templates.
However, I couldn’t find a way to do this. It would be great if this could be included in the docs. If it is already included, please forgive my ignorance and point me to it 😃
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:13
Top Results From Across the Web
[Question] How to utilize vue-runtime build? #1052 - GitHub
Vue comes with a runtime build which allows for CSP compliance. Steps To Reproduce: The following addition to the webpack.mix.js allows mix to ......
Read more >webpack - You are using the runtime-only build of Vue where ...
You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions ...
Read more >Compile Vue.js templates on the Fly with v-runtime-template
A brief guide on using v-runtime-template to render Vue templates on the fly, just like v-html does with plain HTML.
Read more >Frequently Asked Questions - Vue.js
You can learn more about how Vue automatically optimizes runtime performance in the ... When you use a build tool, many of Vue's...
Read more >Vue.js Interview Questions & Answers - Part 2 | Eol Nuha Blogs
You can also define a filter globally before creating the Vue instance. ... In this case you can use runtime-only builds with Webpack...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s your problem. You’re sending HTML with a custom element, which Vue will pick up on, but being unable to handle rendering it, missing the template compiler and all 😛
Try something like this:
EDIT: In addition you shouldn’t have anything inside
<div id="app">
I have used this below code and it’s official mix .js(‘resources/js/app.js’, ‘public/js’).vue() .postCss(‘resources/css/app.css’, ‘public/css’, [ // ]);