We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a322d2c commit d084a8dCopy full SHA for d084a8d
scripts/esm-post-process.mjs
@@ -33,8 +33,8 @@ async function buildEsm(filePath) {
33
const file = await fs.readFile(path.join(process.cwd(), filePath));
34
let content = file.toString();
35
36
- if (fileExt === 'js') {
37
- // add .mjs to all import/export statements, but only on files (keep directory imports as is)
+ if (fileExt === 'js' || fileExt === 'ts') {
+ // add .mjs to all import/export statements, also in the type definitions
38
for (const match of content.matchAll(/from '(\.?\.\/[^']*)'/g)) {
39
const [statement, relImportPath] = match;
40
const absImportPath = path.resolve(
0 commit comments