Skip to content

Instantly share code, notes, and snippets.

@jeremyboles jeremyboles/svg.js
Last active Apr 13, 2019

Embed
What would you like to do?
SVG preset for Neutrino
module.exports = neutrino => {
neutrino.config.resolve.extensions.add('.svg')
const test = neutrino.config.module
.rule('image')
.get('test')
.toString()
.replace('|svg', '')
neutrino.config.module.rule('image').test(test)
neutrino.config.module
.rule('svg')
.test(/\.svg$/)
.use('webpack')
.loader('@svgr/webpack')
.options({ svgAttributes: { role: 'img' }, titleProp: true })
.end()
.use('file')
.loader('file-loader')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.