Skip to content
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

Conflict between url-loader and html-loader #89

Open
clauderobi opened this issue Mar 27, 2022 · 0 comments
Open

Conflict between url-loader and html-loader #89

clauderobi opened this issue Mar 27, 2022 · 0 comments

Comments

@clauderobi
Copy link

Actually, this is not an issue since I have a solution. I am just posting here for others that may have the same problem.

Coming from webpack 4, I was using url-loader. Somehow, when using url-loader for the image type(s) that may appear in my normal html/js code AND in my markdown document the result was that the images were not working with markdown. The image file content was replaced with some JS export directive. By excluding the type(s) that I needed with the markdown document from the generic rule (test) related to url-loader then there is conflict and all is good. Obviously this mean I can not use the same type of file for both normal html/js and markdown, which is not good.. :-(

However, with Webpack 5, a new native module exists, which remove the need to use url-loader. This module (Asset) is apparently smart enough not to conflict with html-loader. This allows to have a generic rule supporting all image types while still be able to use the same type in markdown.

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

No branches or pull requests

1 participant