mirror of
https://github.com/tl-open-source/tl-rtc-file.git
synced 2025-09-27 03:46:11 +08:00

feat: 支持单独发送文件 feat: 支持文本私聊 feat: 支持seafile网盘暂存文件 feat: 支持直播房间 feat: 支持取件码下载文件 feat: 支持预览视频文件 feat: 支持报错告警 feat: 调整补充启动logo feat: 调整补充免责协议 feat: 调整补充配置中的版本号 feat: 调整优化开源协议 feat: 调整补充定制收费服务 feat: 调整优化服务端代码 feat: 调整优化批量发送逻辑 feat: 调整优化样式体验 feat: 调整优化conf中ws, manage相关配置 feat: 调整优化文件发送时间间隔为1秒钟 feat: 调整优化文件发送体验 feat: 调整优化选择文件逻辑 feat: 调整优化启动文件/命令 feat: 调整优化socket配置区分 feat: 调整优化分享进入房间 feat: 调整优化右上角消息提示 feat: 调整删除npm依赖 feat: 调整删除首次弹窗 feat: 即将支持远程cavas画笔 feat: 即将支持远程控制
107 lines
3.0 KiB
JavaScript
107 lines
3.0 KiB
JavaScript
const path = require('path');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
|
const watchNewEntry = require('../plugin/watchNewEntry');
|
|
const { JS_PATH, CSS_PATH } = require('../comm/path');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
devtool: 'source-map',
|
|
watchOptions: {
|
|
ignored: /node_modules/,
|
|
aggregateTimeout: 500,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
include: JS_PATH,
|
|
use: [
|
|
'thread-loader',
|
|
{
|
|
loader: 'babel-loader'
|
|
},
|
|
],
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
exclude: /node_modules/,
|
|
use: [
|
|
MiniCssExtractPlugin.loader,
|
|
{
|
|
loader: 'css-loader',
|
|
options: {
|
|
importLoaders: 1,
|
|
url: false
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new MiniCssExtractPlugin({
|
|
path: path.resolve(CSS_PATH, "./"),
|
|
filename: '[name].min.css',
|
|
ignoreOrder: false,
|
|
}),
|
|
],
|
|
resolve: {
|
|
extensions: [
|
|
'.js',
|
|
],
|
|
},
|
|
stats: {
|
|
children: false,
|
|
},
|
|
externals: {
|
|
jquery: 'jQuery',
|
|
},
|
|
optimization: {
|
|
minimize: true,
|
|
minimizer: [
|
|
new UglifyJSPlugin({
|
|
uglifyOptions: {
|
|
output: {
|
|
comments: false, // 移除所有注释
|
|
beautify: false, // 不要美化输出,以使其更加紧凑
|
|
},
|
|
compress: {
|
|
booleans: true,
|
|
collapse_vars: true,
|
|
comparisons: true,
|
|
conditionals: true,
|
|
dead_code: true,
|
|
drop_console: true,
|
|
drop_debugger: true,
|
|
evaluate: true,
|
|
hoist_funs: true,
|
|
hoist_props: true,
|
|
hoist_vars: true,
|
|
if_return: true,
|
|
inline: true,
|
|
join_vars: true,
|
|
keep_infinity: true,
|
|
loops: true,
|
|
negate_iife: true,
|
|
properties: true,
|
|
reduce_funcs: true,
|
|
reduce_vars: true,
|
|
sequences: true,
|
|
side_effects: true,
|
|
switches: true,
|
|
toplevel: true,
|
|
typeofs: true,
|
|
unused: true,
|
|
},
|
|
mangle: {
|
|
toplevel: true,
|
|
},
|
|
extractComments: true,
|
|
},
|
|
})
|
|
]
|
|
},
|
|
};
|