Skip to content

Commit 35dfaab

Browse files
chore: works around changes in @swc/core 1.3.76 (#3170)
1 parent bad3638 commit 35dfaab

File tree

3 files changed

+253
-250
lines changed

3 files changed

+253
-250
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"@faceless-ui/scroll-info": "^1.3.0",
8989
"@faceless-ui/window-info": "^2.1.1",
9090
"@monaco-editor/react": "^4.5.1",
91-
"@swc/core": "1.3.75",
91+
"@swc/core": "^1.3.76",
9292
"@swc/register": "^0.1.10",
9393
"@types/sharp": "^0.31.1",
9494
"body-parser": "^1.20.1",

src/bin/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
2+
import path from 'path';
23
import minimist from 'minimist';
34
import swcRegister from '@swc/register';
45
import { getTsconfig as getTSconfig } from 'get-tsconfig';
@@ -15,7 +16,7 @@ const swcOptions = {
1516
tsx: true,
1617
},
1718
paths: undefined,
18-
baseUrl: undefined,
19+
baseUrl: __dirname,
1920
},
2021
module: {
2122
type: 'commonjs',
@@ -29,7 +30,9 @@ if (tsConfig?.config?.compilerOptions?.paths) {
2930
swcOptions.jsc.paths = tsConfig.config.compilerOptions.paths;
3031

3132
if (tsConfig?.config?.compilerOptions?.baseUrl) {
32-
swcOptions.jsc.baseUrl = tsConfig.config.compilerOptions.baseUrl;
33+
swcOptions.jsc.baseUrl = path.resolve(
34+
tsConfig.config.compilerOptions.baseUrl,
35+
);
3336
}
3437
}
3538

0 commit comments

Comments
 (0)