Skip to content

Commit ae78ef9

Browse files
committed
using regex
1 parent 2bbce81 commit ae78ef9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/config/path-util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ module.exports = {
8787

8888
let outputPath = webpackConfig.outputPath;
8989
// for comparison purposes, change \ to / on Windows
90-
outputPath = outputPath.split('\\').join('/');
90+
outputPath = outputPath.replace(/\\/g, '/');
9191

9292
// remove trailing slash on each
9393
outputPath = outputPath.replace(/\/$/, '');

lib/webpack/webpack-manifest-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ManifestPlugin.prototype.apply = function(compiler) {
4949
// for Windows, we want the keys to use /, not \
5050
// (and path.join will obviously use \ in Windows)
5151
if (process.platform === 'win32') {
52-
moduleAssets[file] = moduleAssets[file].split('\\').join('/');
52+
moduleAssets[file] = moduleAssets[file].replace(/\\/g).join('/');
5353
}
5454
/* *** MODIFICATION END *** */
5555
});

0 commit comments

Comments
 (0)