razzle-plugin-antd
razzle plugin for antd
Last updated 2 years ago by huangteng .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install razzle-plugin-antd 
SYNC missed versions from official npm registry.

razzle-plugin-antd

a plugin for razzle which let us can use ant-design && less.

how to use

yarn add razzle-plugin-antd
// razzle.config.js
module.exports = {
  plugins: ['antd']
}

// or
module.exports = {
  plugins: [
    {
      name: 'antd',
      options: {
        theme: {}, // antd theme config default {}
        style: true, // babel-plugin-import true || 'css'
        openBabelImport: true, // if open babel-plugin-import
        supportLess: true, // if open less support
        css: { // css-load config
          dev: {
            sourceMap: true,
            importLoaders: 1,
            modules: false,
          },
          pro: {
            sourceMap: false,
            importLoaders: 1,
            minimize: true,
            modules: false
          }
        },
        postcss: { // post-css config
          dev: {
            ident: 'postcss',
            sourceMap: true
          },
          pro: {
            dent: 'postcss',
            sourceMap: false
          },
          plugins: [
            require('postcss-flexbugs-fixes'),
            autoprefixer({
              browsers: [
                '>1%',
                'last 4 versions',
                'Firefox ESR',
                'not ie < 9', // React doesn't support IE8 anyway
              ],
              flexbox: 'no-2009',
            }),
          ]
        },
        less: { // less-loader config
          dev: {
            sourceMap: true,
            includePaths: [paths.appNodeModules],
          },
          pro: {
            sourceMap: false,
            includePaths: [paths.appNodeModules],
          }
        },
        styles: {} // style-loader config default {}
    }
  ]
}

notice

I think this is still not a good solution. If you have a better solution, please remind me.

Current Tags

  • 0.3.5                                ...           latest (2 years ago)

24 Versions

  • 0.3.5                                ...           2 years ago
  • 0.3.4                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.9                                ...           2 years ago
  • 0.2.8                                ...           2 years ago
  • 0.2.7                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 3
Last Month 26
Dependencies (10)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |