next-image-trace-loader
next-image-trace-loader copied to clipboard
Type error
Describe the bug A clear and concise description of what the bug is.
I tried use to default package image-trace-load, but I wasn't able to use it in next. Then I found yours, but I'm getting a very strange bug
Even using your image, and your Tag declaration my page gives me this error:
./public/star-1.png
TypeError: unsupported file type: undefined (file: undefined)
I'm using Typescript with next js
here is my next.config:
/** @type {import('next').NextConfig} */
const withPWA = require("next-pwa");
const tracedImages = {
test: /\.(png|jpe?g|gif|jp2|webp)$/,
use: [
{
loader: 'image-trace-loader'
}
]
};
module.exports = withPWA({
pwa: {
dest: "public",
register: true,
disable: process.env.NODE_ENV === 'development',
skipWaiting: true,
},
reactStrictMode: true,
images: {
domains: ['codingideas.vercel.app'],
},
webpack: (config, options) => {
config.module.rules.push(tracedImages)
return config
}
});
Unfortunately, I'm getting the same error.