Skip to content

Commit a6c1944

Browse files
committed
fix: ignore error importing ts syntax plugin
1 parent 726c609 commit a6c1944

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/main/src/vite/vite.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import * as path from 'node:path'
22
import * as vite from 'vite'
33
import {type PluginItem, transformAsync} from '@babel/core'
44
import * as debug from '@solid-devtools/debugger/types'
5-
import babelTsSyntaxPlugin from '@babel/plugin-syntax-typescript';
5+
// @ts-expect-error
6+
import plugin_ts_syntax from '@babel/plugin-syntax-typescript'
67
import * as babel from '../babel.ts'
78

89
export const enum DevtoolsModule {
@@ -117,7 +118,7 @@ export const devtoolsPlugin = (_options: DevtoolsPluginOptions = {}): vite.Plugi
117118
}
118119

119120
// babel doesn't work with typescript by default
120-
plugins.unshift([babelTsSyntaxPlugin, {isTSX: is_jsx}])
121+
plugins.unshift([plugin_ts_syntax, {isTSX: is_jsx}])
121122

122123
const result = await transformAsync(source, {
123124
babelrc: false,

0 commit comments

Comments
 (0)