html-template-module-loader

0.0.6 • Public • Published

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>

Readme

Keywords

none

Package Sidebar

Install

npm i html-template-module-loader

Weekly Downloads

1

Version

0.0.6

License

ISC

Unpacked Size

6.03 kB

Total Files

3

Last publish

Collaborators

  • chenminqun