#Webpack build missing assets
8 messages · Page 1 of 1 (latest)
@analog bobcat you're are indeed configuring webpack for your styles and js code but I think this could be because of no transformer being used for images.
test: /\.(jpg|png|gif)$/,
use: [
{
loader: 'url-loader',
options: {
// Inline files smaller than 10 kB
limit: 10 * 1024
}
},
{
loader: 'image-webpack-loader',
options: {
mozjpeg: {
enabled: false
// NOTE: mozjpeg is disabled as it causes errors in some Linux environments
// Try enabling it in your environment by switching the config to:
// enabled: true,
// progressive: true,
},
gifsicle: {
interlaced: false
},
optipng: {
optimizationLevel: 7
},
pngquant: {
quality: '65-90',
speed: 4
}
}
}
]
}
Try something like this maybe idk might work (there are deps please don't forget to install them first)
please paste the code from next time don't use images
Thanks for the reply. I tried your suggestion above but still it didn't work. The only thing that works is to import the images directly into the component (import image from "./images/image.jpg";) which is rather frustrating.
indeed that is what the config above will try to do if you have any images imported
so you want every of yours assets to move directly something like that?
um the only way would be to experiment around
Thanks again. I think I will use gulp as an alternative to webpack.