tdl-loader
v1.1.4
Published
## 一个小小小...的Webpack custom Loader🤡
Downloads
1
Maintainers
Readme
tdl-loader
一个小小小...的Webpack custom Loader🤡
使用
xxx.tdl
<div>
<h1>{{ name }}</h1>
<div>{{ age }}</div>
<div>{{ sex }}</div>
</div>
<template>
data = {
name: 'alex',
age: 20,
sex: 'male',
}
</template>
webpack.config.js
rules: [
// ...other rules
{
test: /\.tdl$/,
use: [
{
loader: 'tdl-loader',
options: {
logger: false,
},
},
],
},
],
例子
import tdl from './index.tdl'
document.body.innerHTML = tdl