babel-plugin-transform-react-jsx-img-import icon indicating copy to clipboard operation
babel-plugin-transform-react-jsx-img-import copied to clipboard

Protocol relative urls are not handled correctly

Open ghmcadams opened this issue 8 years ago • 0 comments

urls starting with // are equal to http:// or https://, etc and use the current document's protocol instead of specifying one. You can add support for this easily by changing your source code here:

https://github.com/gvelo/babel-plugin-transform-react-jsx-img-import/blob/master/src/index.js#L38

You just need to add the following that that's all:

|| lowerURL.startsWith('//')

ghmcadams avatar Nov 23 '16 21:11 ghmcadams