Skip to content

Commit

Permalink
Fix windows webpack issue
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed Feb 26, 2020
1 parent b16b360 commit 51175f0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
*
*/

const path = require("path");

exports.default = function pitch(request) {
return request;
};

exports.pitch = function(request) {
return `module.exports = require("${request.replace("umd/perspective.inline", "esm/perspective.parallel")}");`;
const new_path = request.replace(/umd[/\\]perspective.inline/, path.join("esm", "perspective.parallel")).replace(/\\/g, "\\\\");
return `module.exports = require("${new_path}");`;
};

exports.raw = true;

0 comments on commit 51175f0

Please sign in to comment.