Skip to content

Commit d1f7816

Browse files
Updated example for Nuxt.js 2.x
1 parent c3c9fc0 commit d1f7816

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ Similarly to Vue CLI, you need to modify existing rule (in `nuxt.config.js`) tha
8484
module.exports = {
8585
build: {
8686
extend: (config) => {
87-
const svgRule = config.module.rules.find(rule => rule.loader === 'url-loader');
87+
const svgRule = config.module.rules.find(rule => rule.test.test('.svg'));
8888

89-
svgRule.test = /\.(png|jpe?g|gif)$/;
89+
svgRule.test = /\.(png|jpe?g|gif|webp)$/;
9090

9191
config.module.rules.push({
9292
test: /\.svg$/,

0 commit comments

Comments
 (0)