@ywjt/react-components

需要在项目中配置babel-plugin-import

Usage no npm install needed!

<script type="module">
  import ywjtReactComponents from 'https://cdn.skypack.dev/@ywjt/react-components';
</script>

README

使用说明

需要在项目中配置babel-plugin-import

"plugins": [
    // babel 7 以下如下配置 第二个参数用数组
    ["import", [
      { "libraryName": "antd", "libraryDirectory": "es", "style": true },
      {
        "libraryName": "@ywjt/react-components",
        "libraryDirectory": "es",
        "camel2DashComponentName": false,
        "style": true
      }
    ]]

    // babel 7 以上如下配置 可以写多个 import 配置,给予不同名称作为标识
    ["import", { 
        "libraryName": "antd", "libraryDirectory": "es", "style": true 
    }, 'ant-design'],
    ["import", { 
        "libraryName": "@ywjt/react-components", 
        "libraryDirectory": "es", 
        "camel2DashComponentName": false,
        "style": true 
    }, '@ywjt/antd-components']
  ]