File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ export const resolve: resolve = async (
121
121
}
122
122
123
123
const parentNamespace = context . parentURL && getNamespace ( context . parentURL ) ;
124
- if ( requestAcceptsQuery ( specifier ) ) {
124
+ const acceptsQuery = requestAcceptsQuery ( specifier ) ;
125
+ if ( acceptsQuery ) {
125
126
// Inherit namespace from parent
126
127
let requestNamespace = getNamespace ( specifier ) ;
127
128
if ( parentNamespace && ! requestNamespace ) {
@@ -159,8 +160,11 @@ export const resolve: resolve = async (
159
160
// If `allowJs` is set in `tsconfig.json`, then we'll apply the same resolution logic
160
161
// to files without a TypeScript extension.
161
162
if (
162
- tsExtensionsPattern . test ( context . parentURL ! )
163
- || allowJs
163
+ acceptsQuery // file path
164
+ && (
165
+ tsExtensionsPattern . test ( context . parentURL ! )
166
+ || allowJs
167
+ )
164
168
) {
165
169
const tsPaths = resolveTsPath ( specifier ) ;
166
170
if ( tsPaths ) {
You can’t perform that action at this time.
0 commit comments