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
But I can't figure out how to add the images to the build when you run npm run build. I know that I need to add && mkdir images to the create-dist command, but I haven't been able to figure out the remaining steps. Any advice would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
A commit I made yesterday split the webpack.config into separate dev and prod versions for readability. Whatever loader you add for dev you'll need to add to the prod config as well.
Just remembered that I was building off of the Tour of Heroes repo, so I didn't have the latest changes. I took a look at your commit and did a pull, and I see images working on dev out of the box.
However, I still don't know how to get the images included in the prod build. Is there an extra step I need to add for that? Really all I would need is to copy my /images folder from /src to /dist but I'm new to Webpack so I haven't been able to figure that out quite yet.
I'm not sure if this is the right place to post this question, but how do I get the slingshot example to work with images?
I figured out how to build the dev version with images by adding the following line to the
getLoaders
function in webpack.config.js:{ test: /\.(jpe?g|png|gif|svg)$/i, loaders: ['url?limit=8192', 'img']}
But I can't figure out how to add the images to the build when you run
npm run build
. I know that I need to add&& mkdir images
to thecreate-dist
command, but I haven't been able to figure out the remaining steps. Any advice would be greatly appreciated.The text was updated successfully, but these errors were encountered: