Skip to content

Commit

Permalink
[Build] fix the regex to not match base packages
Browse files Browse the repository at this point in the history
  • Loading branch information
RaananW committed Oct 28, 2021
1 parent 35729ec commit aa8587d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/Gulp/helpers/gulp-importFromJsFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let fs = require("fs");
* Add .js to all local imports
*/
function processImports(sourceCode) {
return sourceCode.replace(/((import|export)(.*)('|")(@babylonjs|\.{1,2}\/)(.*))('|");/g, "$1.js$7;").replace(/(\.js){2,}/g, ".js");
return sourceCode.replace(/((import|export).*["'](@babylonjs\/.*\/|\.{1,2}\/).*)("|');/g, "$1.js$4;").replace(/(\.js){2,}/g, ".js");
}

/**
Expand Down

0 comments on commit aa8587d

Please sign in to comment.