npm.io
2.1.1 • Published 6 years ago

@antstudiocz/ant-icons

Licence
MIT
Version
2.1.1
Deps
4
Size
17 kB
Vulns
0
Weekly
0

ai-slim

Usage

Basic

webpack.config.js
const AntIcons = require('ant-icons/lib/plugin')

module.exports = {
  // ...webpack config
  plugins: [
    ...AntIcons()
  ]
}
Custom icon path
webpack.config.js
const AntIcons = require('ant-icons/lib/plugin')
const {resolve} = require('path')

module.exports = {
  // ...webpack config
  plugins: [
    ...AntIcons(resolve(__dirname, 'my', 'custom', 'path', '*.svg'))
  ]
}
Multiple icon paths
webpack.config.js
const AntIcons = require('ant-icons/lib/plugin')
const {resolve} = require('path')

module.exports = {
  // ...webpack config
  plugins: [
    ...AntIcons([
      resolve(__dirname, 'my', 'custom', 'path', '*.svg'),
      resolve(__dirname, 'another', 'custom', 'path', '*.svg'),
      resolve(__dirname, 'and', 'another', 'path', '*.svg'),
    ])
  ]
}