Closed evelant closed 7 years ago
Yeah try file-loader or url-loader. I don't have too much experience with them but they should work.
Yup, @jedwards1211 is right. This is what I do:
<img src={require('./myimage.png')} alt="My Image"/>
I'm going ahead and closing this. @fignuts if you run into any issues using static assets with this skeleton, feel free to let me know in a new issue.
@jedwards1211 How would you recommend handling static assets in development and production with this setup?
I am porting my meteor app to this architecture and I have an existing folder full of assorted images which were previously served up by meteor in the public folder. It looks like I could use https://github.com/webpack/file-loader which would require some refactoring or I could add a route to server/index.js. I am not sure what is the best course of action or if I am missing a better way of doing it.