refactor(rollup): use terser instead of uglify
This commit is contained in:
9
.babelrc
9
.babelrc
@@ -8,14 +8,5 @@
|
||||
],
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
[
|
||||
"react-app"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"plugins": []
|
||||
}
|
||||
2
dist/ReactFlow.js
vendored
2
dist/ReactFlow.js
vendored
File diff suppressed because one or more lines are too long
1
dist/ReactFlow.js.map
vendored
1
dist/ReactFlow.js.map
vendored
File diff suppressed because one or more lines are too long
35
dist/ReactFlow.css → dist/ReactFlow.min.css
vendored
35
dist/ReactFlow.css → dist/ReactFlow.min.css
vendored
@@ -160,17 +160,30 @@
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.react-flow__controls-button {
|
||||
background: #f8f8f8;
|
||||
border: 1px solid #eee;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
.react-flow__controls {
|
||||
box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.react-flow__controls-button {
|
||||
background: #fefefe;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.react-flow__controls-button img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.react-flow__controls-button:hover {
|
||||
background: #eee;
|
||||
}
|
||||
background: #f4f4f4;
|
||||
}
|
||||
8
dist/ReactFlow.min.js
vendored
Normal file
8
dist/ReactFlow.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/ReactFlow.min.js.map
vendored
Normal file
1
dist/ReactFlow.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3483
package-lock.json
generated
3483
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,8 @@
|
||||
"name": "react-flow",
|
||||
"version": "1.0.0",
|
||||
"module": "dist/ReactFlow.esm.js",
|
||||
"browser": "dist/ReactFlow.js",
|
||||
"main": "dist/ReactFlow.js",
|
||||
"browser": "dist/ReactFlow.min.js",
|
||||
"main": "dist/ReactFlow.min.js",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@welldone-software/why-did-you-render": "^3.3.7",
|
||||
@@ -37,6 +37,7 @@
|
||||
"rollup-plugin-postcss": "^2.0.3",
|
||||
"rollup-plugin-serve": "^1.0.1",
|
||||
"rollup-plugin-svg": "^2.0.0",
|
||||
"rollup-plugin-terser": "^5.1.2",
|
||||
"rollup-plugin-uglify": "^6.0.3",
|
||||
"rollup-plugin-visualizer": "^2.6.0",
|
||||
"start-server-and-test": "^1.10.4",
|
||||
|
||||
@@ -4,9 +4,8 @@ import babel from 'rollup-plugin-babel';
|
||||
import postcss from 'rollup-plugin-postcss';
|
||||
import bundleSize from 'rollup-plugin-bundle-size';
|
||||
import visualizer from 'rollup-plugin-visualizer';
|
||||
import { uglify } from 'rollup-plugin-uglify';
|
||||
import svg from 'rollup-plugin-svg'
|
||||
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import svg from 'rollup-plugin-svg';
|
||||
|
||||
import pkg from './package.json';
|
||||
|
||||
@@ -45,6 +44,6 @@ export default [{
|
||||
}),
|
||||
svg(),
|
||||
visualizer(),
|
||||
isProd && uglify()
|
||||
isProd && terser()
|
||||
]}
|
||||
];
|
||||
|
||||
@@ -8,12 +8,10 @@ if (process.env.NODE_ENV !== 'production') {
|
||||
}
|
||||
|
||||
import GraphView from '../GraphView';
|
||||
|
||||
import DefaultNode from '../../components/Nodes/DefaultNode';
|
||||
import InputNode from '../../components/Nodes/InputNode';
|
||||
import OutputNode from '../../components/Nodes/OutputNode';
|
||||
import { createNodeTypes } from '../NodeRenderer/utils';
|
||||
|
||||
import BezierEdge from '../../components/Edges/BezierEdge';
|
||||
import StraightEdge from '../../components/Edges/StraightEdge';
|
||||
import StepEdge from '../../components/Edges/StepEdge';
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export { default as MiniMap } from './MiniMap';
|
||||
export { default as Controls } from './Controls';
|
||||
export { default as Controls } from './Controls';
|
||||
|
||||
Reference in New Issue
Block a user