image-trace-loader
image-trace-loader copied to clipboard
TypeError: unsupported file type: undefined (file: undefined)
Hi, I'm trying to use your package together with [email protected]
, but I'm getting an error error - ./public/assets/handshake.png TypeError: unsupported file type: undefined (file: undefined)
.
My next.config.js
where I push webpack config:
const { i18n } = require("./next-i18next.config");
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
i18n,
trailingSlash: true,
webpack(config) {
config.module.rules.push(
{
type: "asset",
resourceQuery: /url/,
},
{
test: /\.svg$/,
use: {
loader: "@svgr/webpack",
options: {
svgoConfig: {
plugins: [
{
name: "preset-default",
params: {
overrides: {
mergePaths: false,
},
},
},
"prefixIds",
],
},
},
},
},
{
test: /\.(png|jpe?g|gif|jp2|webp)$/,
use: [
{
loader: "image-trace-loader",
},
],
}
);
return config;
},
images: {
domains: ["images.unsplash.com"],
},
async redirects() {
return [
{
source: "/polityka-prywatnosci",
destination: "/privacy-policy",
permanent: true,
},
];
},
};
module.exports = nextConfig;