how to configure optimized-images-loader that supports inline import of images? #9359
arunvenkat1911
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We are using the loader "optimized-images-loader" in our webpack to inline import the images.
We have this webpack config.
module.exports={
...
module: {
rules: [
{
test: [/.svg$/, /.gif$/],
loader: "optimized-images-loader",
options: {
limit: 10000,
name: "static/media/[name].[hash:8].[ext]",
},
}
]
},
...
}
And in module we will import like this.
import LoginImage from './log_in.svg?inline';
Please help us how to configure the same in vite.
Thanks in Advance,
Arun.
Beta Was this translation helpful? Give feedback.
All reactions