https://github.com/zhangshaolong/simplite-loader
https://github.com/zhangshaolong/simplite-loader
loader simplite template tpl webpack
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zhangshaolong/simplite-loader
- Owner: zhangshaolong
- Created: 2018-09-09T04:17:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T09:00:59.000Z (about 7 years ago)
- Last Synced: 2025-09-14T09:38:38.655Z (9 months ago)
- Topics: loader, simplite, template, tpl, webpack
- Language: JavaScript
- Size: 6.13 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simplite loader
load simplite template and compile
install
npm install simplite-loader --save-dev
```javascript
let tpl = import tpl from ('./path/xxx/index.tpl')
domNode.innerHTML = tpl(data)
```
if you use webpack, you can use it at webpack.config.js:
```javascript
module: {
rules: [
{
test: /\.tpl$/,
exclude: /node_modules/,
use: {
loader: 'simplite-loader'
}
}
]
}
```
[simplite template](https://github.com/zhangshaolong/simplite "simplite")
[a webpack+es6+simplite+simplite-loader demo](https://github.com/zhangshaolong/scaffold "scaffold")