Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"./lib/dist/react-transition-group.js": {
"bundled": 79410,
"minified": 22589,
"gzipped": 6905
},
"./lib/dist/react-transition-group.min.js": {
"bundled": 46139,
"minified": 14975,
"gzipped": 4685
}
}
23 changes: 10 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tdd": "jest --watch",
"build": "babel src --out-dir lib --delete-dir-on-start && npm run build:dist && cp README.md LICENSE ./lib",
"build:docs": "npm -C www run build",
"build:dist": "webpack --mode production",
"build:dist": "cross-env BABEL_ENV=esm yarn rollup -c",
"bootstrap": "yarn && yarn --cwd www",
"lint": "eslint src test",
"release": "release",
Expand All @@ -21,13 +21,6 @@
"travis-deploy-once": "travis-deploy-once",
"semantic-release": "semantic-release"
},
"size-limit": [
{
"gzip": false,
"path": "lib/index.js",
"limit": "16.66 KB"
}
],
"repository": {
"type": "git",
"url": "https://github.com/reactjs/react-transition-group.git"
Expand Down Expand Up @@ -81,6 +74,7 @@
"babel-loader": "^8.0.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.18",
"babel-preset-jason": "^6.0.1",
"cross-env": "^5.2.0",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"eslint": "^5.6.0",
Expand All @@ -98,14 +92,17 @@
"react-test-renderer": "^16.5.2",
"release-script": "^1.0.2",
"rimraf": "^2.6.1",
"rollup": "^1.1.0",
"rollup-plugin-babel": "^4.3.0",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-size-snapshot": "^0.8.0",
"rollup-plugin-terser": "^4.0.2",
"semantic-release": "^15.9.16",
"semantic-release-alt-publish-dir": "^2.1.1",
"sinon": "^6.3.4",
"size-limit": "^0.21.1",
"travis-deploy-once": "^5.0.8",
"webpack": "^4.19.1",
"webpack-atoms": "^8.0.0",
"webpack-cli": "^3.1.1"
"travis-deploy-once": "^5.0.8"
},
"release": {
"pkgRoot": "lib",
Expand Down
64 changes: 64 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import nodeResolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import replace from "rollup-plugin-replace";
import { sizeSnapshot } from "rollup-plugin-size-snapshot";
import { terser } from "rollup-plugin-terser";

const input = "./src/umd.js";
const name = "ReactTransitionGroup";
const globals = {
react: "React",
"react-dom": "ReactDOM"
};

const babelOptions = {
exclude: /node_modules/,
runtimeHelpers: true
}

const commonjsOptions = {
include: /node_modules/,
namedExports: {
"prop-types": ["object", "oneOfType", "element", "bool", "func"]
}
};

export default [
{
input,
output: {
file: "./lib/dist/react-transition-group.js",
format: "umd",
name,
globals
},
external: Object.keys(globals),
plugins: [
nodeResolve(),
babel(babelOptions),
commonjs(commonjsOptions),
replace({ "process.env.NODE_ENV": JSON.stringify("development") }),
sizeSnapshot()
]
},

{
input,
output: {
file: "./lib/dist/react-transition-group.min.js",
format: "umd",
name,
globals
},
external: Object.keys(globals),
plugins: [
nodeResolve(),
babel(babelOptions),
commonjs(commonjsOptions),
replace({ "process.env.NODE_ENV": JSON.stringify("production") }),
sizeSnapshot(),
terser()
]
}
];
4 changes: 4 additions & 0 deletions src/umd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as CSSTransition } from './CSSTransition';
export { default as ReplaceTransition } from './ReplaceTransition';
export { default as TransitionGroup } from './TransitionGroup';
export { default as Transition } from './Transition';
35 changes: 0 additions & 35 deletions webpack.config.js

This file was deleted.

Loading