vue-pre-compile-loader
v1.0.1
Published
Pre-compile Vue templates in JS template strings at compile time.
Downloads
83
Maintainers
Readme
vue-pre-compile-loader
Webpack loader to pre-compile Vue 2.0 templates.
npm install -D vue-pre-compile-loader
vue.config.js config
chainWebpack(config) {
// other code....
// add code
const tsRule = config.module.rule("ts");
tsRule
.use("vue-pre-compile-loader")
.loader("vue-pre-compile-loader")
.end();
}
Usage
import { Component, Vue } from 'vue-property-decorator';
@Component({
template: require('./index.html'),
})
export default class extends Vue {}