加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.conf.js 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
tc 提交于 2022-09-21 20:39 . Add NxShell core source code
const path = require("path");
const babelModule = {
rules: [
{
test: /\.js$/,
use: {
loader: "babel-loader"
}
}
]
}
const main = {
mode: "production",
target: "electron-main",
entry: {
index: "./index.js"
},
output: {
filename: "[name].js",
path: path.resolve(__dirname, "dist")
},
module: babelModule,
optimization: {
minimize: true
}
};
const loader = {
mode: "production",
target: "electron-main",
entry: {
AppLoader: "./src/core/AppLoader.js"
},
output: {
filename: "[name].js",
path: path.resolve(__dirname, "dist")
},
module: babelModule,
optimization: {
minimize: true
}
};
const preload = {
mode: "production",
target: "electron-preload",
entry: {
AppClient: "./src/core/AppClient.js"
},
output: {
filename: "[name].js",
path: path.resolve(__dirname, "dist")
},
module: babelModule,
optimization: {
minimize: true
}
}
module.exports = [main, loader, preload];
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化