Skip to content

Commit

Permalink
Return react components instead of a span wrapper for svg files
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilwanner committed Aug 9, 2020
1 parent 0bf799f commit 10480ac
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 21 deletions.
166 changes: 147 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
"test:watch": "npm test -- --watch"
},
"dependencies": {
"@svgr/core": "^5.4.0",
"file-loader": "^6.0.0",
"optimized-images-loader": "^0.3.0",
"react-optimized-image": "^0.3.5"
"optimized-images-loader": "^0.4.0",
"react-optimized-image": "^0.4.0"
},
"devDependencies": {
"@babel/cli": "^7.10.1",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const withOptimizedImages = (
nextConfig.assetPrefix.endsWith('/') ? '' : '/'
}_next/static/chunks/images/`
: '/_next/static/chunks/images/',
includeStrategy: 'react',
...(nextConfig.images || {}),
},
},
Expand Down

0 comments on commit 10480ac

Please sign in to comment.