-
Notifications
You must be signed in to change notification settings - Fork 72
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
How can i use <img src='xxx.png'> without require? #196
Comments
or how can i config to make it usable? |
@BaronJHYu If I understand your question correctly, you're asking why The reason the latter example works is because you make Webpack "aware" of the asset. By importing the image, you're defining an explicit dependency. This allows Webpack to "see" the asset and handle it according to the rules you defined in the configuration file. Webpack won't be able to manage your assets if you just reference them as string somewhere in your code (e.g., For more information about asset management, please refer to Webpack's asset management documentation. @dummdidumm; I believe this issue should be closed as I'm fairly confident this question has more to do with Webpack than |
only ‘require’ usable. Is it some wrong with svelte-loader?
The text was updated successfully, but these errors were encountered: