next.js/test/e2e/app-dir/webpack-loader-set-environment-variable/next.config.js
next.config.js25 lines452 B
const { join } = require('path')

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  turbopack: {
    rules: {
      '*.svg': {
        as: '*.js',
        loaders: [join(__dirname, './custom-loader.js')],
      },
    },
  },
  webpack(config) {
    config.module.rules.push({
      test: /\.svg$/,
      use: [join(__dirname, './custom-loader.js')],
    })

    return config
  },
}

module.exports = nextConfig
Quest for Codev2.0.0
/
SIGN IN