MDL-77995 javascript: more precise path matching building JS.

This commit is contained in:
Paul Holden
2023-04-24 10:53:11 +01:00
parent b90b0e6a8a
commit d8d09c9465
+3 -2
View File
@@ -229,8 +229,9 @@ module.exports = function(grunt) {
* @return {String} The rewritten destination path.
*/
var babelRename = function(destPath, srcPath) {
destPath = srcPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
const path = require('path');
destPath = srcPath.replace(`amd${path.sep}src`, `amd${path.sep}build`);
destPath = destPath.replace(/\.js$/, '.min.js');
return destPath;
};