feat: ready for public

This commit is contained in:
shinya
2025-08-26 22:53:04 +08:00
parent 56edd35675
commit 2a338f1bab
11 changed files with 134 additions and 1461 deletions

View File

@@ -1,7 +1,5 @@
/** @type {import('next').NextConfig} */
/* eslint-disable @typescript-eslint/no-var-requires */
const WebpackObfuscator = require('webpack-obfuscator');
const obfuscationConfig = require('./obfuscation.config.js');
const nextConfig = {
output: 'standalone',
@@ -31,17 +29,7 @@ const nextConfig = {
],
},
webpack(config, { dev, isServer }) {
// 只在生产环境启用混淆
if (!dev && process.env.NODE_ENV === 'production') {
// 服务端代码混淆配置
if (isServer) {
config.plugins.push(
new WebpackObfuscator(obfuscationConfig.obfuscator)
);
}
}
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.('.svg')