mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-21 00:44:41 +08:00
feat: ready for public
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user