Skip to content

Commit

Permalink
Fix #759 - Incorrect import path for ESM files in build script
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Nov 7, 2024
1 parent e954f19 commit 0808d1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/build-esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const generateMJS = (module) => {
let text = fs.readFileSync(src, 'utf-8');

replacements.push(
[/const (.+?)\s*=\s*require\(\'\.(.+)\'\)/ig, 'import $1 from \'$2.mjs\''],
[/const (.+?)\s*=\s*require\(\'\.(.+)\'\)/ig, 'import $1 from \'\.$2.mjs\''],
[/const (.+?)\s*=\s*require\(\'(.+)\'\)/ig, 'import $1 from \'$2\''],
[/module\.exports =/ig, 'export']
);
Expand Down

0 comments on commit 0808d1d

Please sign in to comment.