On 0.4, I'm getting `Module build failed: Error: A valid query string passed to parseQuery should begin with '?'`
See original GitHub issueERROR in ./shape-react-core/~/svg-react-loader/lib/loader.js?name=Icon!./shape-react-core/images/books.svg
Module build failed: Error: A valid query string passed to parseQuery should begin with '?'
at Object.parseQuery (/Users/jameydeorio/dev/orm/frontend/node_modules/loader-utils/lib/parseQuery.js:13:9)
at Object.svgReactLoader (/Users/jameydeorio/dev/orm/frontend/shape-react-core/node_modules/svg-react-loader/lib/loader.js:25:28)
Webpack config:
{
test: /\.svg$/,
exclude: /node_modules/,
loader: 'svg-react'
}
Import statement:
import Icon from 'svg-react?name=Icon!../../images/books.svg'
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
A valid query string passed to parseQuery should begin ...
Get the following error when building: Module build failed (from ./node_modules/ejs-compiled-loader/index.js): Error: A valid query string passed to ...
Read more >npm error:A valid query string passed to parseQuery ...
js > Module build failed: Error: A valid query string passed to parseQuery should begin with '?' > at Object.parseQuery (D:\***\node_modules\_ ...
Read more >A valid query string passed to parseQuery should begin ...
Get the following error when building: Module build failed (from ./node_modules/ejs-compiled-loader/index.js): Error: A valid query string ...
Read more >[Solved]-npm error:A valid query string passed to parseQuery ...
Coding example for the question npm error:A valid query string passed to parseQuery should begin with '?'-Vue.js.
Read more >loader-utils - npm
parseQuery. Parses a passed string (e.g. loaderContext.resourceQuery ) as a query string, and returns an object.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve just ran into the same issue. +1
For anyone who read my previous comment about migrating to
react-svg-loader
– I’m migrating back to this library. The reason is thatreact-svg-loader
feels less convenient (though to a small degree) and this library’s author has finally fixed this issue (even though the others remain).UPDATE Migrating back to
react-svg-loader
because this library has a filename bug https://github.com/jhamlet/svg-react-loader/issues/72