###Usage
in Vue
npm run dev:vue
npm run build:vue
in React
npm run dev:react
npm run build:react
Update at 2016-06-05
Tricks:
- Using svg-sprite-loader to build a svg sprite inject into body
- Using svgo-loader to pretty svg files (you can see the icon
panda
, necessary attributes was removed) - Using the code below (require.context) to require all svg icons in one folder with webpack
const _require = require.context('../../assets/icons', false, /\.svg$/)
_require.keys().forEach(key => _require(key))