BetterDiscordApp-rauenzi/webpack.config.js

64 lines
1.4 KiB
JavaScript
Raw Normal View History

2019-05-28 23:27:25 +02:00
const path = require("path");
const CircularDependencyPlugin = require("circular-dependency-plugin");
const TerserPlugin = require("terser-webpack-plugin");
2019-05-28 23:27:25 +02:00
2019-05-29 07:00:33 +02:00
module.exports = {
mode: "development",
target: "node",
2019-06-08 08:35:43 +02:00
devtool: "eval-source-map",
2019-05-29 07:00:33 +02:00
entry: "./src/index.js",
output: {
filename: "remote.js",
2020-07-23 22:51:58 +02:00
path: path.resolve(__dirname, "dist")
2019-05-29 07:00:33 +02:00
},
externals: {
electron: `require("electron")`,
fs: `require("fs")`,
path: `require("path")`,
request: `require("request")`,
2020-07-16 07:42:56 +02:00
events: `require("events")`,
rimraf: `require("rimraf")`,
yauzl: `require("yauzl")`,
mkdirp: `require("mkdirp")`
2019-05-29 07:00:33 +02:00
},
resolve: {
2019-05-30 07:06:17 +02:00
extensions: [".js", ".jsx"],
alias: {
modules$: path.resolve("src", "modules"),
data$: path.resolve("src", "modules"),
builtins$: path.resolve("src", "modules")
}
2019-05-30 07:06:17 +02:00
},
module: {
rules: [
{
test: /.jsx?$/,
loader: "babel-loader",
exclude: /node_modules/,
query: {
presets: [["@babel/env", {
targets: {
node: "10.11.0",
chrome: "69"
}
}], "@babel/react"]
2019-05-30 07:06:17 +02:00
}
}
]
},
plugins: [
new CircularDependencyPlugin({
2020-07-23 22:51:58 +02:00
exclude: /node_modules/,
cwd: process.cwd(),
})
],
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
compress: {drop_debugger: false}
}
})
]
}
2019-05-28 23:27:25 +02:00
};