forked from sitepoint-editors/memesearchapp-nodegui-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (41 loc) · 787 Bytes
/
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
35
36
37
38
39
40
41
42
const path = require("path");
module.exports = {
mode: process.NODE_ENV || "development",
entry: "./src",
target: "node",
output: {
path: path.resolve(__dirname, "dist"),
filename: "index.js"
},
node: {
__dirname: false,
__filename: false
},
module: {
rules: [
{
test: /\.tsx?$/,
use: "ts-loader",
exclude: /node_modules/
},
{
test: /\.(png|jpe?g|gif|svg)$/i,
use: [{ loader: "file-loader" }]
},
{
test: /\.node$/,
use: [
{
loader: "native-addon-loader",
options: {
name: "[name]-[hash].[ext]"
}
}
]
}
]
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".jsx"]
}
};