You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for this great "starter" application. Since I'm very new to all of this I have a small quastion:
What do we need to add so we can access static files like images?
This way, you will have all your assets passed through webpack. You can do many types of optimizations from here.
With your method, keep in mind that you will also have to figure out a way to put the images in the public directory of the application's jar in prod. It can be as simple as simply putting them here in the first place.
Thanks for the reply.
With this way I can access the files via webpack, thats fine. But what can I do if i need the image for some CSS stuff like 'background: url()?
Activity
nullsumme commentedon Jan 25, 2016
Okay, looks like for development we can use something like this:
geowarin commentedon Jan 25, 2016
The best way IMHO is to use the URL loader of webpack.
I pushed a branch demoing that (requiring the image)
This way, you will have all your assets passed through webpack. You can do many types of optimizations from here.
With your method, keep in mind that you will also have to figure out a way to put the images in the
publicdirectory of the application's jar in prod. It can be as simple as simply putting them here in the first place.nullsumme commentedon Jan 25, 2016
Thanks for the reply.
With this way I can access the files via webpack, thats fine. But what can I do if i need the image for some CSS stuff like 'background: url()?
geowarin commentedon Jan 25, 2016
This should automatically work: see the section about urls of the css loader.
nullsumme commentedon Jan 26, 2016
Perfect! You are right, it works just like that.
Thanks a lot.