tdl-loader

1.1.4 • Public • Published

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

Package Sidebar

Install

npm i tdl-loader

Weekly Downloads

6

Version

1.1.4

License

ISC

Unpacked Size

1.68 kB

Total Files

3

Last publish

Collaborators

  • chengheai