Skip to content

Commit 726c609

Browse files
committed
Merge branch 'fix/vite-babel' of github.com:ylc395/solid-devtools into ylc395-fix/vite-babel
2 parents 6390800 + 9fffd48 commit 726c609

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/main/src/vite/vite.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ 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';
56
import * as babel from '../babel.ts'
67

78
export const enum DevtoolsModule {
@@ -116,7 +117,7 @@ export const devtoolsPlugin = (_options: DevtoolsPluginOptions = {}): vite.Plugi
116117
}
117118

118119
// babel doesn't work with typescript by default
119-
plugins.unshift(['@babel/plugin-syntax-typescript', {isTSX: is_jsx}])
120+
plugins.unshift([babelTsSyntaxPlugin, {isTSX: is_jsx}])
120121

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

0 commit comments

Comments
 (0)