JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q52118F
  • License MIT

react-components-lib-template

Package Exports

  • @aiou/react-components-lib-template

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aiou/react-components-lib-template) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@aiou/react-components-lib-template

build multiple react components lib, insipred by antd-tools

npm GitHub stackblitz

Edit on StackBlitz ⚡️

features

  • output lib & es components version
  • build with gulp
  • multiple react components
  • support css-modules

install

yarn add @aiou/react-components-lib-template

usage

with babel-plugin-import

  • use with umi

    extraBabelPlugins: [
      [
        'import',
        {
          libraryName: '@aiou/react-components-lib-template',
          style: 'css',
        },
      ],
    ]

development

  • Setup - yarn * yarn dev
  • Build - yarn build

Q&A

  • import external stylus lib

    .pipe(
      stylus({
        'include css': true,
        set: ['resolve url'],
        use: [plugin()], // some stylus plugin like nib
        import: [
          path.resolve(
            __dirname,
            'path/index.styl', // external stylus path
          ),
          path.resolve(__dirname, 'components/style/gray.styl'),
        ],
      }),
    )
    
    • css-modules - in build/postcss.config.js