$ npm install svgo-loader --save-dev
... or with Yarn
$ yarn add svgo-loader -D
module.exports = { ..., module: { rules: [ { test: /\.svg$/, type: 'asset', loader: 'svgo-loader' } ] } }
By default svgo-loader uses config from svgo.config.js
similar to svgo cli. See how to configure svgo.
Specify configFile option to load custom config module:
module.exports = { ..., module: { rules: [ { test: /\.svg$/, type: 'asset', loader: 'svgo-loader', options: { configFile: './scripts/svgo.config.js' } } ] } }
or to disable loading config:
module.exports = { ..., module: { rules: [ { test: /\.svg$/, type: 'asset', loader: 'svgo-loader', options: { configFile: false } } ] } }
You can also specify options which override loaded from config
module.exports = { ..., module: { rules: [ { test: /\.svg$/, type: 'asset', loader: 'svgo-loader', options: { multipass: true, js2svg: { indent: 2, pretty: true, } } } ] } }
This software is released under the terms of the MIT license.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4