Archived
1
0

Fix require.toUrl and walkthroughs

This commit is contained in:
Asher
2019-02-01 19:55:32 -06:00
committed by Kyle Carberry
parent a353a59945
commit 6bb62005cb
7 changed files with 68 additions and 25 deletions

View File

@ -22,8 +22,10 @@ module.exports = merge({
test: /\.(j|t)s/,
options: {
multiple: [{
search: "require\\.toUrl\\(",
replace: "requireToUrl(",
// These will be handled by file-loader. We need the location because
// they are parsed as URIs and will throw errors if not fully formed.
search: "require\\.toUrl",
replace: "location.protocol + '//' + location.host + '/' + require",
flags: "g",
}, {
search: "require\\.__\\$__nodeRequire",