diff --git a/packages/ts-plugin/src/index.ts b/packages/ts-plugin/src/index.ts index 949fab3..5d028fb 100644 --- a/packages/ts-plugin/src/index.ts +++ b/packages/ts-plugin/src/index.ts @@ -160,7 +160,7 @@ const boot: tslib.server.PluginModuleFactory = ({ typescript: ts }) => { const { text: expandedText, targetToSourceMap, sourceToTargetMap } = compile({ source, name, - typescript: true, + typescript: !name.toLowerCase().endsWith('.js'), emitError: (message, start, end) => { console.error(`${Syntax.formatPos(start)}-${Syntax.formatPos(end)}: ${message}`); diagnostics.push({ message, start, end });