vite-svg-loader icon indicating copy to clipboard operation
vite-svg-loader copied to clipboard

vite svg loader with typescript gives error when running jest test

Open ahyagoub40 opened this issue 2 years ago • 3 comments

    Configuration error:
    
    Could not locate module @assets/images/icon-calendar.svg?component mapped as:
    /Users/ahmedyagoub/plankk/phoenix/src/assets/$1.
    
    Please check your configuration for these entries:
    {
      "moduleNameMapper": {
        "/@assets\/(.*)/": "/Users/ahmedyagoub/plankk/phoenix/src/assets/$1"
      },
      "resolver": undefined
    }
    ```

ahyagoub40 avatar Sep 02 '21 21:09 ahyagoub40

Hi, thanks for reporting. Could you maybe share your project (or a test project) so I can reproduce this error, and investigate how to resolve it.

jpkleemans avatar Sep 10 '21 13:09 jpkleemans

How would you map it in Jest I am using the svg loader in vue with typescript project, the way it is described in the readme, when i run my tests, I get that message

ahyagoub40 avatar Sep 23 '21 22:09 ahyagoub40

Hi, have you tried the steps in https://github.com/jpkleemans/vite-svg-loader/issues/35?

jpkleemans avatar Jun 16 '22 13:06 jpkleemans

Closed after 60 days of inactivity

jpkleemans avatar Aug 31 '22 10:08 jpkleemans