Is there a way to compile a .vue file into a .js file without webpack or render a browser? I know the kindness of a webpack or browser, but I just need the easiest way to compile the .vue file. For example, I have one component of the comp.vue file that was executed in comp.js (the compiler must compile sass and pug in the .vue file), and then I can use it in my application, as shown below:
<head> <script src="vue.min.js"></script> <script src="comp.js"></script> //it may pack the whole component into variable comp and add the style <script> Vue.component('comp', comp); window.onload = function() { new Vue({el: '#app'}); } </script> </head> <body id='app'> <comp></comp> </body>
or another similar / simpler way?
source share