1.0.5 • Published 5 years ago

vue2-html-loader v1.0.5

Weekly downloads
40
License
ISC
Repository
github
Last release
5 years ago
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.

OptionDescriptionDefault
removeCommentsremove html commentstrue
removeWhiteSpaceremove html whiteSpacetrue
removeNewlineremove html newLine (actual \r\n)true
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago