forked from ritz078/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextron.config.js
37 lines (35 loc) · 931 Bytes
/
nextron.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
const webpack = require("webpack");
require("dotenv").config();
const path = require("path");
const cwd = process.cwd();
module.exports = {
webpack: (defaultConfig) =>
Object.assign(defaultConfig, {
entry: {
background: "./main/background.ts",
},
module: {
rules: [
{
test: /\.tsx?$/,
use: {
loader: "babel-loader",
options: {
cacheDirectory: true,
presets: ["next/babel", "@babel/preset-typescript"],
},
},
exclude: [/node_modules/, path.join(cwd, "renderer")],
},
],
},
plugins: [
...defaultConfig.plugins,
new webpack.DefinePlugin({
TMDB_API: `"${process.env.TMDB_API}"`,
SUBTITLES: `"${process.env.SUBTITLES}"`,
UA_ID: `"${process.env.UA_ID}"`,
}),
],
}),
};