Open chandangowda opened 3 years ago
even tried all the configuration which was mentioned in other issues still not working my image is present inside src folder and even tried to place image in project folder still not working
below is the retired code:
const postcss = require('rollup-plugin-postcss');
const images = require('@rollup/plugin-image');
module.exports = {
rollup(config) {
config.plugins.push(
postcss({
plugins: [],
})
);
config.plugins = [
images({ include: ['**/*.png', '**/*.jpg'] }),
...config.plugins,
]
return config;
},
};
Here is my project https://github.com/chandangowda/Tsdx
I can confirm this problem exists for svg files as well.
How to fix it?
@shikelong i tried copy roll up plugin, it didn't work for me either
Still not working :(
This is quite an old issue, but for anyone coming here from a search engine: the solution is to use relative paths. So:
// DO NOT
import img from "images/image.png";
// DO
import img from "./images/image.png";
i followed the step to configure images but it is not working by code snippet for rollup images is: