Skip to content

Commit

Permalink
Remove babel-plugin-size-snapshot
Browse files Browse the repository at this point in the history
The auto-generation of a .size-snapshot.json file caused a deploy to
fail: https://travis-ci.org/ReactTraining/react-router/jobs/590619908

Also, I'm not a fan of all the commits that just update the
.size-snapshot.json files. If we re-introduce size tracking, we need to
have a better strategy.
  • Loading branch information
mjackson committed Sep 27, 2019
1 parent 6039477 commit 7e09c7b
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 1,063 deletions.
10 changes: 7 additions & 3 deletions package.json
Expand Up @@ -34,11 +34,15 @@
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-size-snapshot": "^0.10.0",
"rollup-plugin-uglify": "^6.0.3"
},
"workspaces": {
"packages": ["packages/*"],
"nohoist": ["**/react-native", "**/react-native/**"]
"packages": [
"packages/*"
],
"nohoist": [
"**/react-native",
"**/react-native/**"
]
}
}
26 changes: 0 additions & 26 deletions packages/react-router-config/.size-snapshot.json

This file was deleted.

22 changes: 13 additions & 9 deletions packages/react-router-config/rollup.config.js
Expand Up @@ -2,7 +2,6 @@ const babel = require("rollup-plugin-babel");
const replace = require("rollup-plugin-replace");
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");
Expand Down Expand Up @@ -51,8 +50,7 @@ const esm = [
sourceMaps: true,
runtimeHelpers: true,
plugins: [["@babel/transform-runtime", { useESModules: true }]]
}),
sizeSnapshot()
})
]
}
];
Expand Down Expand Up @@ -80,9 +78,12 @@ const umd = [
plugins: [["@babel/transform-runtime", { useESModules: true }]]
}),
nodeResolve(),
commonjs({ include: /node_modules/ }),
replace({ "process.env.NODE_ENV": JSON.stringify("development") }),
sizeSnapshot()
commonjs({
include: /node_modules/
}),
replace({
"process.env.NODE_ENV": JSON.stringify("development")
})
]
},
{
Expand All @@ -105,9 +106,12 @@ const umd = [
plugins: [["@babel/transform-runtime", { useESModules: true }]]
}),
nodeResolve(),
commonjs({ include: /node_modules/ }),
replace({ "process.env.NODE_ENV": JSON.stringify("production") }),
sizeSnapshot(),
commonjs({
include: /node_modules/
}),
replace({
"process.env.NODE_ENV": JSON.stringify("production")
}),
uglify()
]
}
Expand Down
26 changes: 0 additions & 26 deletions packages/react-router-dom/.size-snapshot.json

This file was deleted.

17 changes: 9 additions & 8 deletions packages/react-router-dom/rollup.config.js
@@ -1,10 +1,10 @@
const path = require("path");
const babel = require("rollup-plugin-babel");
const replace = require("rollup-plugin-replace");
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) {
Expand Down Expand Up @@ -51,8 +51,7 @@ const esm = [
runtimeHelpers: true,
sourceMaps: true,
plugins: [["@babel/transform-runtime", { useESModules: true }]]
}),
sizeSnapshot()
})
]
}
];
Expand Down Expand Up @@ -86,8 +85,9 @@ const umd = [
"../../node_modules/react-is/index.js": ["isValidElementType"]
}
}),
replace({ "process.env.NODE_ENV": JSON.stringify("development") }),
sizeSnapshot()
replace({
"process.env.NODE_ENV": JSON.stringify("development")
})
]
},
{
Expand Down Expand Up @@ -116,8 +116,9 @@ const umd = [
"../../node_modules/react-is/index.js": ["isValidElementType"]
}
}),
replace({ "process.env.NODE_ENV": JSON.stringify("production") }),
sizeSnapshot(),
replace({
"process.env.NODE_ENV": JSON.stringify("production")
}),
uglify()
]
}
Expand Down
26 changes: 0 additions & 26 deletions packages/react-router/.size-snapshot.json

This file was deleted.

13 changes: 6 additions & 7 deletions packages/react-router/rollup.config.js
@@ -1,10 +1,10 @@
const path = require("path");
const babel = require("rollup-plugin-babel");
const replace = require("rollup-plugin-replace");
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) {
Expand Down Expand Up @@ -58,8 +58,9 @@ const esm = [
sourceMaps: true,
plugins: [["@babel/transform-runtime", { useESModules: true }]]
}),
replace({ "process.env.BUILD_FORMAT": JSON.stringify("esm") }),
sizeSnapshot()
replace({
"process.env.BUILD_FORMAT": JSON.stringify("esm")
})
]
}
];
Expand Down Expand Up @@ -96,8 +97,7 @@ const umd = [
replace({
"process.env.NODE_ENV": JSON.stringify("development"),
"process.env.BUILD_FORMAT": JSON.stringify("umd")
}),
sizeSnapshot()
})
]
},
{
Expand Down Expand Up @@ -130,7 +130,6 @@ const umd = [
"process.env.NODE_ENV": JSON.stringify("production"),
"process.env.BUILD_FORMAT": JSON.stringify("umd")
}),
sizeSnapshot(),
uglify()
]
}
Expand Down

0 comments on commit 7e09c7b

Please sign in to comment.