mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 05:43:50 +02:00
Add improved logic for loading Node.js module (fixes #118)
This commit is contained in:
@@ -24,7 +24,7 @@ const walkDir = (dir: string) => {
|
||||
const fixFile = (filePath: string) => {
|
||||
const content = fs.readFileSync(filePath, 'utf8');
|
||||
const fixed = content.replace(
|
||||
/(\s+from\s+['"])([^'"]*)(['"])/g,
|
||||
/(\s+from\s+['"])(\.[^'"]*)(['"])/g, // This only matches relative imports
|
||||
'$1$2.js$3',
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user