Skip to content

Commit

Permalink
fix: darwin production install test v2
Browse files Browse the repository at this point in the history
  • Loading branch information
daretodave committed Apr 29, 2024
1 parent f438f55 commit 14ecedf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/vendor/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ export async function compile(
return new Promise((resolve, reject) => {
const linux = process.platform === 'linux'
const darwin: boolean = process.platform === 'darwin'
const node_modules = join(rootPath, 'node_modules', 'ts-loader')
//'/Applications/mterm.app/node_modules/ts-loader
const mac_node_modules = join(rootPath, 'Contents', 'node_modules', 'ts-loader')
const linux_node_modules = join('opt', 'mterm', 'node_modules', 'ts-loader')
const windows_node_modules = './node_modules/ts-loader'

webpack(
{
Expand All @@ -20,11 +23,7 @@ export async function compile(
rules: [
{
test: /\.tsx?$/,
use: linux
? '/opt/mterm/node_modules/ts-loader'
: darwin
? node_modules
: './node_modules/ts-loader',
use: linux ? linux_node_modules : darwin ? mac_node_modules : windows_node_modules,
exclude: /node_modules/
}
]
Expand Down

0 comments on commit 14ecedf

Please sign in to comment.