next.config.js 366 B

123456789101112131415161718192021
  1. /** @type {import('next').NextConfig} */
  2. const nextConfig = {
  3. experimental: {
  4. appDir: true,
  5. },
  6. webpack(config) {
  7. config.module.rules.push({
  8. test: /\.svg$/,
  9. use: ["@svgr/webpack"],
  10. }); // 针对 SVG 的处理规则
  11. return config;
  12. }
  13. };
  14. if (process.env.DOCKER) {
  15. nextConfig.output = 'standalone'
  16. }
  17. module.exports = nextConfig;