0.0.6 • Published 10 months ago

html-template-module-loader v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

html-template-module-loader

npm node size

Getting Started

To begin, you'll need to install html-template-module-loader:

$ npm install html-template-module-loader --save-dev

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.html$/i,
        use: [
          {
            loader: 'html-template-module-loader',
            options: {
                tag: 'tpl',
                attr: 'file',
                tplTag: 'template',
                tplAttr: 'tpl'
            }
          },
        ],
      },
    ],
  },
};

example

// template: example-tpl.html
<template tpl>
    模版
</template> 
// html
<tpl file="./src/tpl/example-tpl.html"></tpl>
0.0.3

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.6

10 months ago

0.0.2

2 years ago

0.0.1

2 years ago