build(packages): Remove swc --delete-dir-on-start (#4433)

Since we build the .js files and the .d.ts files in 2 different steps, you could run the tsc build and then the swc one, making swc delete the tsc build.

This is somewhat mitigated if you ran the tsc build with turbo as it will restore the cache, but it is annoying + the TS server in vscode for example will someone require you to restart it as it did not found the declration files for the package while it was building.

I did not find any good reason for this flag to be present, as while it will preserve files that no longer have a source, this matters only for local builds, as CI will always cleanly build the packages (and this issue exists with type declration as well anyway)

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
Fleny
2025-09-18 00:58:00 +05:30
committed by GitHub
co-authored by Awesome Stickz
parent 87d16dd9ba
commit df1658d923
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
"url": "git+https://github.com/discordeno/discordeno.git"
},
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start --out-dir dist",
"build": "swc src --strip-leading-paths --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",
+1 -1
View File
@@ -13,7 +13,7 @@
"!dist/.tsbuildinfo"
],
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist",
"build": "swc src --strip-leading-paths src --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",
+1 -1
View File
@@ -13,7 +13,7 @@
"!dist/.tsbuildinfo"
],
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist",
"build": "swc src --strip-leading-paths src --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",
+1 -1
View File
@@ -13,7 +13,7 @@
"!dist/.tsbuildinfo"
],
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist",
"build": "swc src --strip-leading-paths src --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",
+1 -1
View File
@@ -13,7 +13,7 @@
"!dist/.tsbuildinfo"
],
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist",
"build": "swc src --strip-leading-paths src --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",
+1 -1
View File
@@ -13,7 +13,7 @@
"!dist/.tsbuildinfo"
],
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist",
"build": "swc src --strip-leading-paths src --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",
+1 -1
View File
@@ -13,7 +13,7 @@
"!dist/.tsbuildinfo"
],
"scripts": {
"build": "swc src --strip-leading-paths --delete-dir-on-start src --out-dir dist",
"build": "swc src --strip-leading-paths src --out-dir dist",
"build:type": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"release-build": "yarn build && yarn build:type",
"check": "biome check --write",