Vue single-file compiler
Allow you to compile single-file vue components to js and css strings.
Example :
Component.vue :
{{ variable }}
How to use vue-file-compiler :
const fs = const compiler = let vueSource = fslet result = console
result.js
will output as a string :
var component = return variable: test componenttemplate = `<div> {{ variable }}</div>` component
Then, you just have to do :
const fs = const compiler = let vueSource = fslet result = const Vue = let component = Vue
To get the style as a string, use result.style
. To get the "lang" attribute of the style, use result.styleLang
(it will be css
if the "lang" attribute is not specified).