BetterDiscordApp-rauenzi/webpack.config.js

48 lines
1.0 KiB
JavaScript
Raw Normal View History

2019-05-28 23:27:25 +02:00
const path = require("path");
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: "main.js",
path: path.resolve(__dirname, "js"),
library: "Core",
libraryTarget: "var",
libraryExport: "default"
},
externals: {
electron: `require("electron")`,
fs: `require("fs")`,
path: `require("path")`,
request: `require("request")`,
events: `require("events")`
},
resolve: {
2019-05-30 07:06:17 +02:00
extensions: [".js", ".jsx"],
2019-05-29 07:00:33 +02:00
modules: [
2019-05-30 23:18:52 +02:00
path.resolve("src", "builtins"),
2019-05-29 07:00:33 +02:00
path.resolve("src", "data"),
path.resolve("src", "modules"),
path.resolve("src", "ui")
]
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-29 07:00:33 +02:00
}
2019-05-28 23:27:25 +02:00
};