@chenng/babel-plugin-ivcomponent

适用于开发 https://m.v.qq.com/txi/dev/ 组件的 babel plugin。

Usage no npm install needed!

<script type="module">
  import chenngBabelPluginIvcomponent from 'https://cdn.skypack.dev/@chenng/babel-plugin-ivcomponent';
</script>

README

babel-plugin-ivcomponent

适用于开发 https://m.v.qq.com/txi/dev/ 组件的 babel plugin。

安装与使用

npm install @chenng/babel-plugin-ivcomponent -D
// webpack.config.js
rules: [
  {
    test: /\.js$/,
    exclude: /node_modules/,
    use: {
      loader: 'babel-loader',
      options: {
        plugins: ['@chenng/babel-plugin-ivcomponent'], // 配置插件
        presets: ['@babel/preset-env'],
      }
    }
  }
]

本地调试

npm run dev -- --env.comp="Bubble" -w