File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,11 @@ export const resolve: resolve = async (
161
161
// If `allowJs` is set in `tsconfig.json`, then we'll apply the same resolution logic
162
162
// to files without a TypeScript extension.
163
163
if (
164
- // Ignore if it's a bare package name and there's no subpath
165
- ! isBarePackageName . test ( specifier )
164
+ (
165
+ specifier . startsWith ( '#' )
166
+ // Ignore if it's a bare package name and there's no subpath
167
+ || ! isBarePackageName . test ( specifier )
168
+ )
166
169
&& (
167
170
tsExtensionsPattern . test ( context . parentURL ! )
168
171
|| allowJs
Original file line number Diff line number Diff line change @@ -272,10 +272,14 @@ export const files = {
272
272
'package.json' : createPackageJson ( {
273
273
type : 'module' ,
274
274
main : './index.js' ,
275
+ imports : {
276
+ '#*' : './*' ,
277
+ } ,
275
278
} ) ,
276
279
'index.js' : `${ syntaxLowering } \nexport * from "./empty-export"` ,
277
- 'ts.ts' : syntaxLowering ,
278
280
'empty-export/index.js' : 'export {}' ,
281
+ 'ts.ts' : `${ syntaxLowering } \nexport * from "#empty.js"` ,
282
+ 'empty.ts' : 'export {}' ,
279
283
} ,
280
284
} ,
281
285
} ;
You can’t perform that action at this time.
0 commit comments