File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import type * as ts from 'typescript'
2
+ import type { ExternalModule } from '../components/player/VendorComponents'
2
3
import {
4
+ ExternalStyles ,
3
5
PlaygroundOptions ,
4
6
ResponsivePaneSet ,
5
- ExternalStyles ,
6
7
} from '../components/workspace/Workspace'
7
8
import * as DefaultCode from '../constants/DefaultCode'
8
- import { PaneOptions , PaneShorthand , normalizePane } from './Panes'
9
- import defaultLibs from '../utils/TypeScriptDefaultLibs'
10
9
import defaultCompilerOptions from '../utils/TypeScriptDefaultConfig'
11
- import type { ExternalModule } from '../components/player/VendorComponents'
10
+ import defaultLibs from '../utils/TypeScriptDefaultLibs'
11
+ import { PaneOptions , PaneShorthand , normalizePane } from './Panes'
12
12
import { extname } from './path'
13
13
14
14
export interface TypeScriptOptions {
@@ -270,7 +270,7 @@ function findImports(code: string) {
270
270
const name = match [ 1 ] || match [ 2 ]
271
271
272
272
// Check if this import looks like a module name (and not a relative import)
273
- if ( name && name . match ( / ^ [ a - z A - Z ] / ) ) {
273
+ if ( name && ( name . startsWith ( '@' ) || name . match ( / ^ [ a - z A - Z ] / ) ) ) {
274
274
imports . push ( name )
275
275
}
276
276
}
You can’t perform that action at this time.
0 commit comments