antd-local-icon
A webpack loader for deploy icon files when using the antd
Usage
Note that you must import antd source instead of distribution.
-
npm install --save-dev antd-local-icon
-
Download the antd icon to local and place all font files in your project.
-
Modify your
webpack.config.js
like following:
moduleexports = //... your config module: loaders: //... your config { // extract 'index.less' in antd to load it using antd-local-icon return /\.less/ && abspath == -1; } loader: "style!css!less" { return abspath !== -1; } // the param url is your local icon files location. loader: "style!css!less!antd-local-icon?url=/assets/font/iconfont"
Feedback
If you have any questions or requirements, use Issues.