yoxjs / yox-template-loader

webpack loader for yox template file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yox-template-loader

If you want to use the runtime version of yoxjs, you have to precompile the template at first.

This is a webpack loader for precompiling yox template file.

Install

NPM

npm i yox-template-loader

YARN

yarn add yox-template-loader

Usage

xx.hbs

.hbs is recommended, that is a Handlebars file extname

<div class="example">
  {{msg}}
</div>

webpack.config.js

rules: [
  {
    test: /\/src\/.*?\.hbs$/,
    use: [{
      loader: 'yox-template-loader'
    }]
  }
]

About

webpack loader for yox template file

License:MIT License


Languages

Language:JavaScript 100.0%