40 Star 378 Fork 80

Clark / log.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
w.c.b.js 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
fanliang 提交于 2022-11-18 17:56 . fix: new code
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const WebpackBar = require('webpackbar');
const path = require('path');
const packageJson = require('./package.json');
const version = packageJson['version'];
module.exports = {
entry: {
app: './src/index.ts'
},
plugins: [
new WebpackBar({ name: 'log.js', color: '#52c41a' }),
new CleanWebpackPlugin(),
new HTMLWebpackPlugin({
template: "./debugTool.html",
filename: "debugTool.html"
}),
new UglifyJsPlugin({
uglifyOptions:{
compress:{
drop_console:false
}
},
sourceMap:true,
parallel:true
})
],
module: {
rules: [
{ test: /\.js$/, loader: "babel-loader", options: { cacheDirectory: true }, exclude: /node_modules/ },
{ test: /\.ts$/, loader: 'ts-loader', exclude: /node_modules/ }
]
},
mode: 'production',
resolve: {
extensions: [".ts", ".js", ".json"]
},
output: {
filename: `log.min.js`,
path: path.resolve(__dirname, `version/${version}`)
},
optimization: {
minimize: true
}
}
TypeScript
1
https://gitee.com/clark-fl/log.js.git
git@gitee.com:clark-fl/log.js.git
clark-fl
log.js
log.js
master

搜索帮助