-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 to have inline assets working in production bundling? #214
Comments
The things I had to do to make it work:
Inside
Now add the image loader to the loaders array (you can remove any other image loaders in case you have any to avoid overrides)
Make sure the path to image is always relative to the path your |
Thank you for the answer, @vivaPQ. I had to run a very similar configuration to get assets to load within my In short, how do we go about importing assets within Thanks, in advance, for the help. |
Ah.. I see.. so the issue here is also when you want to distribute the app.. the In the end I had to just follow what #139 @jvalen recommends. Remove all of above suggestions so that you don't get duplicates in assets (some hashed some in
Like this in The assets get copied in dist folder so they are accessible. |
Awesome! That's the type of workflow I implemented, @vivaPQ, but with a gulp process for moving the assets into the fist directory.
Thanks, again, for the help. |
Cool
|
Yeah, good point. |
I noticed we could also leverage the |
I've tried several times to configure Webpack to be able to bundle inline assets, such as
<img src="path/images/xyz.jpg" />
, however, the paths do not get updated within thedist
bundle and I don't believe theassets
are there either.Any ideas?
The text was updated successfully, but these errors were encountered: