Skip to content

Commit

Permalink
fix: support path query (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofzo committed Oct 13, 2022
1 parent 7f91473 commit b4d523a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function viteSvgr({
async transform(code, id) {
if (filter(id)) {
const { transform } = await import('@svgr/core')
const svgCode = await fs.promises.readFile(id, 'utf8')
const svgCode = await fs.promises.readFile(id.replace(/\?.*$/, ""), 'utf8')

const componentCode = await transform(svgCode, svgrOptions, {
filePath: id,
Expand Down

0 comments on commit b4d523a

Please sign in to comment.