Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Different behavior when using webpack2 #14

Closed
priyajeet opened this issue Dec 19, 2016 · 4 comments
Closed

Different behavior when using webpack2 #14

priyajeet opened this issue Dec 19, 2016 · 4 comments

Comments

@priyajeet
Copy link

I am using the raw-loader to inline some SVG / HTML as raw strings. With webpack it worked fine. With webpack2 I am getting:

<button>
module.exports = __webpack_public_path__ + "src/lib/icons/button.svg";
</button>

while with webpack1:

<button>
<svg>
    ...
</svg>
</button>
@priyajeet
Copy link
Author

User error, sorry

@rainboxx
Copy link

Could you tell us what was actually wrong? I have the same issue, still looking for what I did wrong 😉.

@rainboxx
Copy link

Well, not the same, but I get module.exports = "data:image/svg+xml;base64,PHN2ZyB2aW... and I assume that, if your issue was a wrong handling of webpack, it might be similar.

@priyajeet
Copy link
Author

priyajeet commented Jan 19, 2017

My error was that I had "svg" extension accidentally listed (as part of a regex) in the file-loader entry also. An oversight.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants