question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import of SVG-file fails with extraction (returns undefined)

See original GitHub issue

With my current build-process, the import of an SVG-file returns undefined when extraction is turned on. with { extract: off } it returns an object as expected per documentation.

I have created a reduced test-case, which I will hope assist the debugging process.

Details of my setup:

  • Windows 10
  • Node v. 7.2.1 See package.json for further details.

To Reproduce:

  • Download the test-case and install dependencies.
  • Start up the project with npm start. This should launch your web-browser at http://localhost:3000.
  • Open the console, and see that undefined is logged by Shell.vue:12, which attempts to log the import of ./assets/arrow.svg.
  • In build/webpack.base.conf.js:59, set extract: true and run the build process again.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
kisenkacommented, May 9, 2017

Got it, it’s Windows path resolving issue. I will have access to Windows machine tomorrow, stay tuned!

1reaction
kisenkacommented, May 9, 2017

That strange. Could you push latest changes in your repo so I can check?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting undefined when importing svg as ReactComponent ...
To import an SVG: import MySvg from "MySvg.svg" which will save the ... The reason you get undefined is that you are destructuring...
Read more >
How to use SVGs in React
There are a few ways to use an SVG in a React app: Use it as a regular image; Import it as a...
Read more >
includesvg does not detect SVG file
Changing the relative path to an absolute one ( D:\Desktop\TEST\my-svg-file` in this case), leads to completely different errors: Log file ... !
Read more >
MiniCssExtractPlugin
HMR is automatically supported in webpack 5. No need to configure it. Skip the following: The mini-css-extract-plugin supports hot reloading of actual css...
Read more >
Oracle Digital Assistant Known Issues - Cloud
A webview error occurs when importing, cloning, or versioning a skill. Web SDK - If you return an undefined message in the beforeDisplay...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found