diff --git a/Gruntfile.js b/Gruntfile.js index c03c4e5c2e3..71353fc14e1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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; };