-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Labels
needs reproductionThis issue is missing a minimal runnable reproduction, provided by the authorThis issue is missing a minimal runnable reproduction, provided by the author
Description
Version
3.0.4
Node and OS info
Node v8.9.1, npm 5.5.1, win 10
Steps to reproduce
- Within a project, add a SVG within a sprite by using "import Close from '@/assets/icons/ui.svg?close' "
- Add a unit test (using jest) to this component.
- Run tests.
What is expected?
Test runs
What is actually happening?
Get error:
Configuration error:
Could not lo
cate module @/assets/icons/ui.svg?close mapped as:
C:\Users\user\git\vue 3\proj\src\assets/icons/ui.svg?close.
Please check your configuration for these entries:
{
"moduleNameMapper": {
"/^@\/(.*)$/": "C:\Users\user\git\vue 3\proj\src\$1"
},
"resolver": null
I upgraded this project to the new cli, and had to use SVGs differently to how we were using them before, and then came across this problem as one of the steps in the upgrade. We're using the loader vue-svg-sprite-loader in webpack to get this working. Previously, we were using :xlink:href within a component, but now we're using a component (e.g. < Close / >) .
Jest config is the same as default.
Metadata
Metadata
Assignees
Labels
needs reproductionThis issue is missing a minimal runnable reproduction, provided by the authorThis issue is missing a minimal runnable reproduction, provided by the author