Skip to content

Commit

Permalink
Fix bad string escape
Browse files Browse the repository at this point in the history
  • Loading branch information
pc2459 committed Jan 31, 2018
1 parent b4a5cb8 commit e6d45cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function normalizePath(str) {
throw new TypeError('Expected string');
}

return str.replace(/[\\\/]+/g, '/');
return str.replace(/[\\\/]/g, '/');
}

F2ManifestsLoaderError.prototype = Object.create(Error.prototype);
Expand Down Expand Up @@ -81,7 +81,7 @@ module.exports = function (source) {
content: source
});
appclass = normalizePath(appclass);
scripts.push('"' + normalizePath(appclass) + '?v=' + cacheBuster + '"');
scripts.push('"' + appclass + '?v=' + cacheBuster + '"');

// Load styles
var styles = [];
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function normalizePath(str) {
throw new TypeError('Expected string');
}

return str.replace(/[\\\/]+/g, '/');
return str.replace(/[\\\/]/g, '/');
}

F2ManifestsLoaderError.prototype = Object.create(Error.prototype);
Expand Down Expand Up @@ -79,7 +79,7 @@ module.exports = function(source) {
content: source
});
appclass = normalizePath(appclass);
scripts.push(`"${normalizePath(appclass)}?v=${cacheBuster}"`);
scripts.push(`"${appclass}?v=${cacheBuster}"`);

// Load styles
const styles = [];
Expand Down
2 changes: 1 addition & 1 deletion tests/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const config = {
exclude: /node_modules/,
options: {
dest: path.join(__dirname, 'output/loader/manifests'),
commonScripts: ['s1.js', 's2,js'],
commonScripts: ['s1.js', 'http://test.com/s2.js'],
commonStyles: ['s1.css', 's2.css']
}
}
Expand Down

0 comments on commit e6d45cb

Please sign in to comment.