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