-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support ES module syntax #203
Comments
Below are the details for reference. I would like to attempt a PR to fix, if someone can share some guidance on how to resolve this issue in html-loader. Bug reportWhat is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior? The Here is a diff between the actual and expected output: <!doctype html>
<html>
<head>
<meta charset="utf-8" />
- <link rel="shortcut icon" href="[object Module]" />
+ <link rel="shortcut icon" href="/favicon@hash.ico" />
</head>
<body>
- <img src="[object Module]" alt=""/>
+ <img src="/favicon@hash.ico" alt=""/>
<script type="text/javascript" src="/app@13359e76.js"></script></body>
</html>
Other relevant information: |
@nil4 The problem was solved in The fix will definitely involve code of this form, I would think, but this code has to be executed at runtime. So you wouldn't put this code in loader, you'd put it in the code the loader generates.
Just from 20 minutes of looking at the code, I'd try changing the end of
Disclaimer: I haven't run or tested anything above, just trying to help you get started. |
Good solution, yes, we need this, in near future we refactor code and i will do it |
I had same problem in vue js when i upgraded .....i realized it was caused by file-loader version 5+ |
@kagz Yes, until this issue is fixed, file-loader 5+ and html-loader will be incompatible at their default settings. Downgrading file-loader is one option, but you can also use file-loader 5+ with |
/cc @ryanclark i think we can close issue, right? |
Yep should be good to close @evilebottnawi |
Unfortunately, the |
Still need to set |
webpack/webpack#10053
The text was updated successfully, but these errors were encountered: