Skip to content

Commit

Permalink
fix #1046
Browse files Browse the repository at this point in the history
check OS and substring different on windows
  • Loading branch information
Julian Kern committed Jul 22, 2018
1 parent fc90410 commit 8a8ae25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/graph/treeshake.js
@@ -1,5 +1,6 @@
"use strict";

var os = require("os");
var babel = require("babel-standalone");
var entries = require("object.entries");
var dependencyResolver = require("../node/dependency_resolver");
Expand All @@ -17,6 +18,9 @@ function treeshake(data) {
let getNode = id => data.graph[id];
let mains = uniq(data.mains.concat(data.loader.bundle));
let cwd = process.cwd().substr(1);
if (os.type().toLowerCase() === "windows_nt"){
cwd = process.cwd().substr(3);
}

return rollup.rollup({
entry: mains,
Expand Down

0 comments on commit 8a8ae25

Please sign in to comment.