Closed Thy3634 closed 2 years ago
Thanks @Thy3634 I'll look into it next week
@Thy3634 Could you run the linter over your code? npm run lint
Failed. So I add a submit, and the code could be linted over now.
Failed. So I add a submit, and the code could be linted over now.
There are still some lint errors:
index.js:5:36: Missing space before function parentheses.
index.js:12:14: Missing space before function parentheses.
index.js:15:15: Missing space before function parentheses.
index.js:19:38: Strings must use singlequote.
index.js:20:21: Strings must use singlequote.
index.js:22:28: Strings must use singlequote.
index.js:26:20: Missing space before function parentheses.
index.js:30:38: Strings must use singlequote.
index.js:31:21: Strings must use singlequote.
index.js:39:36: Unexpected trailing comma.
index.js:40:11: Extra semicolon.
index.js:41:73: Extra semicolon.
Maybe git ignored something. I add a commit via github directly. It should work.
Thanks for your changes! I've added 1 comment.
Thanks for your work 👍
This PR breaks ?url
feature.
@CzBiX Could you explain what exactly breaks?
@jpkleemans, When I write code like this:
import SvgIcon from 'foobar/demo.svg?url'
console.log(SvgIcon)
It will output the local path of file, like /home/demo/src/demo.svg
, which failed to load in browser.
I hacked the code to return void
in load
and transform
if query === 'url'
, then it works as my expect.
Using
?url
suffix to explicit URL Imports, as well as?raw
suffix to import .svg file as string.20 by gawlk