svg-icons.js 258 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 const req = require.context('../../../assets/icons/svg', false, /\.svg$/) const requireAll = requireContext => requireContext.keys() const re = /\.\/(.*)\.svg/ const svgIcons = requireAll(req).map(i => { return i.match(re)[1] }) export default svgIcons