1.0.5 • Published 5 years ago
vue2-html-loader v1.0.5
npm i -D vue2-html-loader
{
test: /\.(html)$/,
use: {
loader: 'vue2-html-loader',
options: {
removeComments: true,
removeWhiteSpace: true,
removeNewline: true,
}
}
}
import template from 'path/to/your/template.html';
new Vue({
template,
...otherOptions
});
Use Typescript
import template from 'path/to/your/template.html';
@Component({
template,
})
export default class VueComponents extends Vue {
...others
}
Options Quick Reference
Most of the options are disabled by default.
Option | Description | Default |
---|---|---|
removeComments | remove html comments | true |
removeWhiteSpace | remove html whiteSpace | true |
removeNewline | remove html newLine (actual \r\n) | true |