Skip to content

Commit d6ddd15

Browse files
committed
Don't cache TS results
This is EXTREMELY annyoing that if you run build once and it fails, the failed build will be cached. Now even if you fix the underlying issue and rebuild, the result will still be cached and you'll be getting a build error even though you fixed everything. This wastes a lot of time and it must be the third time I've come across this.
1 parent 103e493 commit d6ddd15

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.changeset/rare-avocados-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-storefront/rollup-config": patch
3+
---
4+
5+
- [CHANGED] Always clear rollup-plugin-typescript2 cache when building. If you built once with an error, you'd always get an error even if you fixed the underlying code issue that caused the build to fail. This could be fixed by removing node_modules/.cache, but it's better to never create the cache at all.

engineering-toolkit/rollup-config/src/apiClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function generateServerConfig(pkg: any) {
2525
nodeResolve({
2626
extensions,
2727
}),
28-
typescript(),
28+
typescript({ clean: true }),
2929
commonjs({
3030
extensions,
3131
}),

engineering-toolkit/rollup-config/src/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function generateBaseConfig(pkg: any) {
2626
nodeResolve({
2727
extensions,
2828
}),
29-
typescript(),
29+
typescript({ clean: true }),
3030
],
3131
};
3232
}

engineering-toolkit/rollup-config/src/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ export function generateSDKConfig(pkg: any) {
1616
},
1717
],
1818
external: [...Object.keys(pkg.dependencies || {})],
19-
plugins: [typescript()],
19+
plugins: [typescript({ clean: true })],
2020
};
2121
}

0 commit comments

Comments
 (0)