Skip to content

Commit

Permalink
build with swc instaed of tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatOneCalculator committed Sep 22, 2023
1 parent 1ed1479 commit c433776
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
22 changes: 22 additions & 0 deletions megalodon/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"jsc": {
"target": "es5",
"parser": {
"syntax": "typescript",
"tsx": false,
"decorators": false,
"dynamicImport": false
},
"transform": {
"legacyDecorator": false,
"decoratorMetadata": false
},
"externalHelpers": false,
"keepClassNames": false
},
"module": {
"type": "commonjs"
},
"minify": true,
"sourceMaps": false
}
13 changes: 9 additions & 4 deletions megalodon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./lib/src/index.js",
"typings": "./lib/src/index.d.ts",
"scripts": {
"build": "tsc -p ./",
"build": "swc ./src -d ./lib",
"lint": "eslint --ext .js,.ts src",
"doc": "typedoc --out ../docs ./src",
"test": "NODE_ENV=test jest -u --maxWorkers=3"
Expand Down Expand Up @@ -44,9 +44,12 @@
],
"preset": "ts-jest/presets/default",
"transform": {
"^.+\\.(ts|tsx)$": ["ts-jest", {
"tsconfig": "tsconfig.json"
}]
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
"tsconfig": "tsconfig.json"
}
]
},
"testEnvironment": "node"
},
Expand All @@ -67,6 +70,8 @@
"ws": "8.14.2"
},
"devDependencies": {
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.87",
"@types/core-js": "^2.5.6",
"@types/form-data": "^2.5.0",
"@types/jest": "^29.5.5",
Expand Down

0 comments on commit c433776

Please sign in to comment.