1 Star 0 Fork 13

gjTool/robot-tools

forked from vnool/robot-tools 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
yooge 提交于 2020-11-23 02:10 +08:00 . first commit
//https://www.webpackjs.com/api/node/#%E9%94%99%E8%AF%AF%E5%A4%84%E7%90%86-error-handling-
//var webpack = require('webpack');
//const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
//const staticJs = require('./plugins.static.js');
//const removeJs = require('./plugins.remove.js');
//const CopyWebpackPlugin = require('copy-webpack-plugin');
var config = require('./config.js');
module.exports = (env, args) => {
return {
mode: "production", //production, development
//target: 'node',
entry: config.entry,
output: {
filename: config.outfile,
path: config.outpath
},
module: {
rules: [{
test: /\.(png|jpg|gif|html)$/,
use: [{
loader: 'file-loader',
options: {}
}]
},
// {
// test: /\.js$/,
// exclude: /(node_modules|bower_components)/, //排除掉node_module目录
// use: {
// loader: 'babel-loader',
// options: {
// presets: ['@babel/preset-env'] ,//转码规则
// //presets: ['es2015']
// },
// }
// }
]
},
//plugins:[removeJs],
// optimization: {
// minimize: true,
// minimizer: [new UglifyJsPlugin()] //使用自定义压缩工具
// }
// plugins: [
// new CopyWebpackPlugin(
// [{
// from: './static/robots/logo.png',
// to: './static/robots/logo.png',
// }]
// )
// ]
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/gjTool/robot-tools.git
git@gitee.com:gjTool/robot-tools.git
gjTool
robot-tools
robot-tools
main

搜索帮助