Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unsupported file type: undefined (file: undefined) #39

Open
chmielulu opened this issue Apr 7, 2022 · 0 comments
Open

TypeError: unsupported file type: undefined (file: undefined) #39

chmielulu opened this issue Apr 7, 2022 · 0 comments

Comments

@chmielulu
Copy link

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant