diff --git a/packages/start-plugin-core/src/start-compiler-plugin/compilers.ts b/packages/start-plugin-core/src/start-compiler-plugin/compilers.ts index f5d244e5c1a..08a679fe2f2 100644 --- a/packages/start-plugin-core/src/start-compiler-plugin/compilers.ts +++ b/packages/start-plugin-core/src/start-compiler-plugin/compilers.ts @@ -52,12 +52,16 @@ export function compileStartOutputFactory( // find referenced identifiers *before* we transform anything const refIdents = doDce ? findReferencedIdentifiers(ast) : undefined + const validImportSources = [ + `@tanstack/${framework}-start`, + '@tanstack/start-client-core', + ] babel.traverse(ast, { Program: { enter(programPath) { programPath.traverse({ ImportDeclaration: (path) => { - if (path.node.source.value !== `@tanstack/${framework}-start`) { + if (!validImportSources.includes(path.node.source.value)) { return }