Skip to content

Commit 20996b1

Browse files
committed
Fix main package build
1 parent f49db74 commit 20996b1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

packages/main/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Nuclear main process",
55
"scripts": {
66
"start": "shx rm -rf build && webpack --env NODE_ENV=development && electron build/main.js --inspect=9001",
7-
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 webpack --env NODE_ENV=production",
7+
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 webpack --progress --env NODE_ENV=production",
88
"lint": "eslint src/**/**.ts",
99
"lint:fix": "eslint src/**/**.ts --fix",
1010
"test": "jest --silent"
@@ -95,4 +95,4 @@
9595
"mpris-service": "2.1.0",
9696
"x11": "^2.3.0"
9797
}
98-
}
98+
}

packages/main/webpack.config.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ const osMapper: Record<string, BuildEnv['TARGET']> = {
1515
};
1616

1717
const MAIN_DIR = path.resolve(__dirname, 'src');
18-
const CORE_DIR = path.resolve(__dirname, '..', 'core', 'src');
19-
const CORE_DIR_SYMLINKED = path.resolve(__dirname, 'node_modules', '@nuclear', 'core', 'src');
18+
const CORE_DIR = path.resolve(__dirname, '..', '..', 'node_modules', '@nuclear', 'core', 'src');
2019

2120
module.exports = (env: BuildEnv): webpack.Configuration => {
2221
if (!env.TARGET) {
@@ -52,9 +51,12 @@ module.exports = (env: BuildEnv): webpack.Configuration => {
5251
module: {
5352
rules: [
5453
{
55-
test: /.ts?$/,
54+
test: /\.ts?$/,
5655
loader: 'ts-loader',
57-
include: [MAIN_DIR, CORE_DIR, CORE_DIR_SYMLINKED]
56+
include: [MAIN_DIR, CORE_DIR],
57+
options: {
58+
allowTsInNodeModules: true
59+
}
5860
},
5961
{
6062
test: /\.node$/,

0 commit comments

Comments
 (0)