forked from Dygmalab/Bazecor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.renderer.config.ts
44 lines (41 loc) · 1006 Bytes
/
webpack.renderer.config.ts
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
35
36
37
38
39
40
41
42
43
44
import type { Configuration } from "webpack";
import path from "path";
import rules from "./webpack.rules";
import plugins from "./webpack.plugins";
rules.push({
test: /\.css$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" },
{
loader: "postcss-loader",
options: {
postcssOptions: {
plugins: [require("tailwindcss"), require("autoprefixer")],
},
},
},
],
});
const rendererConfig: Configuration = {
target: "electron-renderer",
module: {
rules,
},
plugins,
resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".css"],
alias: {
"@Assets": path.resolve(__dirname, "src", "static"),
"@Renderer": path.resolve(__dirname, "src", "renderer"),
"@Types": path.resolve(__dirname, "src", "renderer", "types"),
},
},
externals: {
"uiohook-napi": "uiohook-napi",
serialport: "serialport",
"@serialport": "@serialport",
usb: "usb",
},
};
export default rendererConfig;