Skip to content

Commit

Permalink
Fix build on windows. (#6740)
Browse files Browse the repository at this point in the history
  • Loading branch information
StringEpsilon authored and timdorr committed May 11, 2019
1 parent 82ce94c commit 48a97bf
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 25 deletions.
6 changes: 4 additions & 2 deletions packages/react-router-config/rollup.config.js
Expand Up @@ -4,11 +4,13 @@ const commonjs = require("rollup-plugin-commonjs");
const nodeResolve = require("rollup-plugin-node-resolve");
const { sizeSnapshot } = require("rollup-plugin-size-snapshot");
const { uglify } = require("rollup-plugin-uglify");

const path = require("path");
const pkg = require("./package.json");

function isBareModuleId(id) {
return !id.startsWith(".") && !id.startsWith("/");
return (
!id.startsWith(".") && !id.includes(path.join(process.cwd(), "modules"))
);
}

const cjs = [
Expand Down
14 changes: 7 additions & 7 deletions packages/react-router-dom/.size-snapshot.json
@@ -1,6 +1,6 @@
{
"esm/react-router-dom.js": {
"bundled": 8159,
"bundled": 8167,
"minified": 4903,
"gzipped": 1641,
"treeshaked": {
Expand All @@ -14,13 +14,13 @@
}
},
"umd/react-router-dom.js": {
"bundled": 159106,
"minified": 56622,
"gzipped": 16367
"bundled": 159166,
"minified": 56640,
"gzipped": 16373
},
"umd/react-router-dom.min.js": {
"bundled": 95961,
"minified": 33642,
"gzipped": 9929
"bundled": 96021,
"minified": 33660,
"gzipped": 9934
}
}
6 changes: 4 additions & 2 deletions packages/react-router-dom/rollup.config.js
Expand Up @@ -4,11 +4,13 @@ const commonjs = require("rollup-plugin-commonjs");
const nodeResolve = require("rollup-plugin-node-resolve");
const { sizeSnapshot } = require("rollup-plugin-size-snapshot");
const { uglify } = require("rollup-plugin-uglify");

const path = require("path");
const pkg = require("./package.json");

function isBareModuleId(id) {
return !id.startsWith(".") && !id.startsWith("/");
return (
!id.startsWith(".") && !id.includes(path.join(process.cwd(), "modules"))
);
}

const cjs = [
Expand Down
22 changes: 11 additions & 11 deletions packages/react-router/.size-snapshot.json
@@ -1,26 +1,26 @@
{
"esm/react-router.js": {
"bundled": 23435,
"minified": 13241,
"gzipped": 3679,
"bundled": 23486,
"minified": 13259,
"gzipped": 3684,
"treeshaked": {
"rollup": {
"code": 2214,
"code": 2232,
"import_statements": 470
},
"webpack": {
"code": 3577
"code": 3595
}
}
},
"umd/react-router.js": {
"bundled": 99032,
"minified": 35013,
"gzipped": 11222
"bundled": 99085,
"minified": 35031,
"gzipped": 11229
},
"umd/react-router.min.js": {
"bundled": 61635,
"minified": 21414,
"gzipped": 7600
"bundled": 61688,
"minified": 21432,
"gzipped": 7606
}
}
6 changes: 4 additions & 2 deletions packages/react-router/rollup.config.js
Expand Up @@ -4,11 +4,13 @@ const commonjs = require("rollup-plugin-commonjs");
const nodeResolve = require("rollup-plugin-node-resolve");
const { sizeSnapshot } = require("rollup-plugin-size-snapshot");
const { uglify } = require("rollup-plugin-uglify");

const path = require("path");
const pkg = require("./package.json");

function isBareModuleId(id) {
return !id.startsWith(".") && !id.startsWith("/");
return (
!id.startsWith(".") && !id.includes(path.join(process.cwd(), "modules"))
);
}

const cjs = [
Expand Down
25 changes: 25 additions & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion website/package.json
Expand Up @@ -3,7 +3,7 @@
"name": "react-router-website",
"version": "5.0.0",
"scripts": {
"build": "NODE_ENV=production webpack -p",
"build": "cross-env NODE_ENV=production webpack -p",
"start": "webpack-dev-server --inline --host 0.0.0.0"
},
"dependencies": {
Expand Down Expand Up @@ -37,6 +37,7 @@
"bundle-loader": "^0.5.5",
"cheerio": "^0.22.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.2.0",
"css-loader": "^0.28.7",
"eslint": "^4.19.1",
"eslint-plugin-import": "^2.12.0",
Expand Down

0 comments on commit 48a97bf

Please sign in to comment.