-
Notifications
You must be signed in to change notification settings - Fork 18
/
webpack.main.config.js
38 lines (37 loc) · 1.19 KB
/
webpack.main.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
/* eslint-disable @typescript-eslint/no-var-requires */
const CopyPlugin = require("copy-webpack-plugin");
const path = require("path");
module.exports = {
/**
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
entry: "./src/index.ts",
// Put your normal webpack config below here
module: {
rules: require("./webpack.rules"),
},
resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".css", ".json"],
alias: {
// "@": path.resolve(__dirname, "./"),
},
},
plugins: [
new CopyPlugin({
patterns: [
{ from: "./temp/sub.js", to: "sub.js" },
{ from: "./locales/**/*" },
{ from: "./temp/readPacksWorker.js", to: "readPacksWorker.js" },
{ from: "./temp/schema.js", to: "schema.js" },
{ from: "./temp/schema/**/*", to: "../schema/[name][ext]" },
{ from: "./node_modules/binary-file", to: "../node_modules/binary-file" },
{ from: "./node_modules/denodeify", to: "../node_modules/denodeify" },
{
from: "./node_modules/@ai-zen/steamworks.js/",
to: "../node_modules/@ai-zen/steamworks.js/",
},
],
}),
],
};