Skip to content

Commit bf23694

Browse files
fix: run start compiler on imports from @tanstack/start-client-core (#5702)
1 parent 9266fa1 commit bf23694

File tree

1 file changed

+5
-1
lines changed
  • packages/start-plugin-core/src/start-compiler-plugin

1 file changed

+5
-1
lines changed

packages/start-plugin-core/src/start-compiler-plugin/compilers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,16 @@ export function compileStartOutputFactory(
5757
// find referenced identifiers *before* we transform anything
5858
const refIdents = doDce ? findReferencedIdentifiers(ast) : undefined
5959

60+
const validImportSources = [
61+
`@tanstack/${framework}-start`,
62+
'@tanstack/start-client-core',
63+
]
6064
babel.traverse(ast, {
6165
Program: {
6266
enter(programPath) {
6367
programPath.traverse({
6468
ImportDeclaration: (path) => {
65-
if (path.node.source.value !== `@tanstack/${framework}-start`) {
69+
if (!validImportSources.includes(path.node.source.value)) {
6670
return
6771
}
6872

0 commit comments

Comments
 (0)