-
Notifications
You must be signed in to change notification settings - Fork 70
/
webpack.config.ts
42 lines (41 loc) · 1.11 KB
/
webpack.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
import { fileURLToPath } from "url";
import path from "path";
import assetPath from "./src/services/asset_path.js";
const rootDir = path.dirname(fileURLToPath(import.meta.url));
export default {
mode: 'production',
entry: {
setup: './src/public/app/setup.js',
mobile: './src/public/app/mobile.js',
desktop: './src/public/app/desktop.js',
},
output: {
publicPath: `${assetPath}/app-dist/`,
path: path.resolve(rootDir, 'src/public/app-dist'),
filename: '[name].js',
},
module: {
rules: [
{
test: /\.ts$/,
use: [{
loader: 'ts-loader',
options: {
configFile: path.join(rootDir, "tsconfig.webpack.json")
}
}],
exclude: /node_modules/,
},
]
},
resolve: {
extensions: ['.ts', '.js'],
extensionAlias: {
".js": [".js", ".ts"],
".cjs": [".cjs", ".cts"],
".mjs": [".mjs", ".mts"]
}
},
devtool: 'source-map',
target: 'electron-renderer',
};