Skip to content

Commit 48a97bf

Browse files
StringEpsilontimdorr
authored andcommittedMay 11, 2019
Fix build on windows. (#6740)
1 parent 82ce94c commit 48a97bf

File tree

7 files changed

+57
-25
lines changed

7 files changed

+57
-25
lines changed
 

‎packages/react-router-config/rollup.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ const commonjs = require("rollup-plugin-commonjs");
44
const nodeResolve = require("rollup-plugin-node-resolve");
55
const { sizeSnapshot } = require("rollup-plugin-size-snapshot");
66
const { uglify } = require("rollup-plugin-uglify");
7-
7+
const path = require("path");
88
const pkg = require("./package.json");
99

1010
function isBareModuleId(id) {
11-
return !id.startsWith(".") && !id.startsWith("/");
11+
return (
12+
!id.startsWith(".") && !id.includes(path.join(process.cwd(), "modules"))
13+
);
1214
}
1315

1416
const cjs = [
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"esm/react-router-dom.js": {
3-
"bundled": 8159,
3+
"bundled": 8167,
44
"minified": 4903,
55
"gzipped": 1641,
66
"treeshaked": {
@@ -14,13 +14,13 @@
1414
}
1515
},
1616
"umd/react-router-dom.js": {
17-
"bundled": 159106,
18-
"minified": 56622,
19-
"gzipped": 16367
17+
"bundled": 159166,
18+
"minified": 56640,
19+
"gzipped": 16373
2020
},
2121
"umd/react-router-dom.min.js": {
22-
"bundled": 95961,
23-
"minified": 33642,
24-
"gzipped": 9929
22+
"bundled": 96021,
23+
"minified": 33660,
24+
"gzipped": 9934
2525
}
2626
}

‎packages/react-router-dom/rollup.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ const commonjs = require("rollup-plugin-commonjs");
44
const nodeResolve = require("rollup-plugin-node-resolve");
55
const { sizeSnapshot } = require("rollup-plugin-size-snapshot");
66
const { uglify } = require("rollup-plugin-uglify");
7-
7+
const path = require("path");
88
const pkg = require("./package.json");
99

1010
function isBareModuleId(id) {
11-
return !id.startsWith(".") && !id.startsWith("/");
11+
return (
12+
!id.startsWith(".") && !id.includes(path.join(process.cwd(), "modules"))
13+
);
1214
}
1315

1416
const cjs = [
+11-11
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"esm/react-router.js": {
3-
"bundled": 23435,
4-
"minified": 13241,
5-
"gzipped": 3679,
3+
"bundled": 23486,
4+
"minified": 13259,
5+
"gzipped": 3684,
66
"treeshaked": {
77
"rollup": {
8-
"code": 2214,
8+
"code": 2232,
99
"import_statements": 470
1010
},
1111
"webpack": {
12-
"code": 3577
12+
"code": 3595
1313
}
1414
}
1515
},
1616
"umd/react-router.js": {
17-
"bundled": 99032,
18-
"minified": 35013,
19-
"gzipped": 11222
17+
"bundled": 99085,
18+
"minified": 35031,
19+
"gzipped": 11229
2020
},
2121
"umd/react-router.min.js": {
22-
"bundled": 61635,
23-
"minified": 21414,
24-
"gzipped": 7600
22+
"bundled": 61688,
23+
"minified": 21432,
24+
"gzipped": 7606
2525
}
2626
}

‎packages/react-router/rollup.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ const commonjs = require("rollup-plugin-commonjs");
44
const nodeResolve = require("rollup-plugin-node-resolve");
55
const { sizeSnapshot } = require("rollup-plugin-size-snapshot");
66
const { uglify } = require("rollup-plugin-uglify");
7-
7+
const path = require("path");
88
const pkg = require("./package.json");
99

1010
function isBareModuleId(id) {
11-
return !id.startsWith(".") && !id.startsWith("/");
11+
return (
12+
!id.startsWith(".") && !id.includes(path.join(process.cwd(), "modules"))
13+
);
1214
}
1315

1416
const cjs = [

‎website/package-lock.json

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎website/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "react-router-website",
44
"version": "5.0.0",
55
"scripts": {
6-
"build": "NODE_ENV=production webpack -p",
6+
"build": "cross-env NODE_ENV=production webpack -p",
77
"start": "webpack-dev-server --inline --host 0.0.0.0"
88
},
99
"dependencies": {
@@ -37,6 +37,7 @@
3737
"bundle-loader": "^0.5.5",
3838
"cheerio": "^0.22.0",
3939
"copy-webpack-plugin": "^4.0.1",
40+
"cross-env": "^5.2.0",
4041
"css-loader": "^0.28.7",
4142
"eslint": "^4.19.1",
4243
"eslint-plugin-import": "^2.12.0",

0 commit comments

Comments
 (0)
Please sign in to comment.