next.config.js 358 B

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