Skip to content

Commit

Permalink
Fix test and CJS behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
nwalters512 committed Apr 24, 2024
1 parent 1632a30 commit 86e33ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/cjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ const resolveTsFilename = (

if (
parent?.filename
&& isTsFilePatten.test(parent.filename)
&& (
isTsFilePatten.test(parent.filename)
|| tsconfig?.config.compilerOptions?.allowJs
)
&& tsPath
) {
for (const tryTsPath of tsPath) {
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const files = {
import './import-typescript-child.js';
`,

'import-typescript-child.js': sourcemap.tag`
'import-typescript-child.ts': sourcemap.tag`
console.log('imported');
`,

Expand Down

0 comments on commit 86e33ea

Please sign in to comment.