rm dark
This commit is contained in:
@@ -1,18 +1,33 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
// 启用 webpack 配置
|
||||
webpack: (config) => {
|
||||
// 设置需要转译的包
|
||||
transpilePackages: ['swagger-ui-react'],
|
||||
|
||||
// 禁用严格模式,避免开发时重复渲染
|
||||
reactStrictMode: false,
|
||||
|
||||
webpack: (config, { dev }) => {
|
||||
// 添加 CSS 处理规则
|
||||
config.module.rules.push({
|
||||
test: /\.css$/,
|
||||
type: 'asset/source',
|
||||
});
|
||||
|
||||
|
||||
// 仅在生产环境中排除 Swagger
|
||||
if (!dev) {
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
'swagger-ui-react': false,
|
||||
};
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user