Use this module in your babel configuration to strip out the svg imports when using svg-sprite webpack loader
Useful if creating a bundle specific for the server
With npm do
npm install babel-plugin-transform-strip-svg-sprite --save-dev
...
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
cacheDirectory: true,
presets: ['es2015', 'react'],
plugins: [
'transform-strip-svg-sprite'
]
}
}
...