Files
memory-manager-concurrent/webpack.config.js
user 6078f85d06 feat: v0.5.0 - 总结世界书拆分优化、Part调试面板、Amily表格并发等
主要更新:
- 总结世界书并发拆分功能(自动检测约5万字拆分为Part)
- Part调试面板
- Amily表格并发填充模块(src/table-filler/)
- 合并去重开关
- 内置默认独立模板
- 多主题支持优化
- 添加.gitignore排除不必要文件

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 01:46:18 +08:00

65 lines
2.0 KiB
JavaScript

const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = (env, argv) => {
const isProduction = argv.mode === 'production';
return {
entry: './src/index.js',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
iife: true,
clean: true,
},
optimization: {
minimize: isProduction,
minimizer: [
new TerserPlugin({
terserOptions: {
format: {
comments: false,
},
compress: {
drop_console: false,
drop_debugger: true,
},
},
extractComments: false,
}),
],
},
devtool: isProduction ? false : 'inline-source-map',
watchOptions: {
ignored: /node_modules/,
aggregateTimeout: 300,
},
performance: {
hints: isProduction ? 'warning' : false,
maxEntrypointSize: 512000,
maxAssetSize: 512000,
},
resolve: {
extensions: ['.js'],
alias: {
'@': path.resolve(__dirname, 'src'),
'@core': path.resolve(__dirname, 'src/core'),
'@config': path.resolve(__dirname, 'src/config'),
'@worldbook': path.resolve(__dirname, 'src/worldbook'),
'@api': path.resolve(__dirname, 'src/api'),
'@memory': path.resolve(__dirname, 'src/memory'),
'@hooks': path.resolve(__dirname, 'src/hooks'),
'@ui': path.resolve(__dirname, 'src/ui'),
'@utils': path.resolve(__dirname, 'src/utils'),
'@table-filler': path.resolve(__dirname, 'src/table-filler'),
}
},
};
};