-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
34 lines (33 loc) · 1.04 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const path = require("path");
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
module.exports = {
entry: "./src/renderer/index.tsx",
output: {
filename: "main.bundle.js",
path: path.resolve(__dirname, "./build/window"),
},
// Allows importing build-in node modules in electron render.
// https://stackoverflow.com/questions/39417628/how-to-reference-node-fs-api-with-electron-in-typescript
target: "electron-renderer",
resolve: {
extensions: [".js", ".json", ".ts", ".tsx"],
plugins: [new TsconfigPathsPlugin({ configFile: "./tsconfig.json" })],
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: {
loader: "ts-loader",
options: {
configFile: "tsconfig.renderer.json",
},
},
},
],
},
externals: {
fsevents: "require('fsevents')",
// archiver: 'require(\'archiver\')'
},
};