0.0.6 • Published 3 months ago

html-template-module-loader v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 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

3 months ago

0.0.5

3 months ago

0.0.4

3 months ago

0.0.6

3 months ago

0.0.2

12 months ago

0.0.1

12 months ago