Skip to content
Snippets Groups Projects
Select Git revision
  • develop default protected
  • issue/358-fix-new-biblioteca
  • issue/271.3-update-routes-new-backend
  • issue/332-resource-edit
  • issue-299/FIX-change-name-share-button-profile-page
  • issue/271.gus
  • 289-tela-de-perfil-inserir-icones-no-cabecalho
7 results

next.config.mjs

Blame
  • next.config.mjs 1.23 KiB
    /** @type {import('next').NextConfig} */
    const nextConfig = {
        output: 'standalone',
        reactStrictMode: false,
        webpack: (config) => {
            config.resolve.alias.canvas = false;
            const fileLoaderRule = config.module.rules.find((rule) =>
                rule.test?.test?.(".svg")
                );
        
                config.module.rules.push(
                {
                    ...fileLoaderRule,
                    test: /\.svg$/i,
                    resourceQuery: /url/,
                },
        
                {
                    test: /\.svg$/i,
                    issuer: fileLoaderRule.issuer,
                    resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] },
                    use: ["@svgr/webpack"],
                }
                );
        
                fileLoaderRule.exclude = /\.svg$/i;
            return config;
        },
        images: {
            remotePatterns: [
                {
                    protocol: 'https',
                    hostname: 'api.mecred.c3sl.ufpr.br',
                    port: '',
                    pathname: '/**',
                },
                {
                    protocol: 'http',
                    hostname: 'mecdb4.c3sl.ufpr.br',
                    port: '443',
                    pathname: '/**',
                },
            ],
        },
    };
    
    export default nextConfig;