refactor(deps): replace d3-color with empty object
This commit is contained in:
Generated
+2192
-5
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-flow-renderer",
|
||||
"version": "10.2.2",
|
||||
"version": "10.2.3-next.0",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
@@ -61,6 +61,7 @@
|
||||
"@babel/preset-env": "^7.17.10",
|
||||
"@babel/preset-react": "^7.16.7",
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
"@rollup/plugin-alias": "^3.1.9",
|
||||
"@rollup/plugin-babel": "^5.3.1",
|
||||
"@rollup/plugin-commonjs": "^22.0.0",
|
||||
"@rollup/plugin-node-resolve": "^13.2.1",
|
||||
@@ -81,6 +82,7 @@
|
||||
"release-it": "^14.14.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.71.0",
|
||||
"rollup-plugin-filesize": "^9.1.2",
|
||||
"rollup-plugin-livereload": "^2.0.5",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"rollup-plugin-serve": "^1.1.0",
|
||||
|
||||
@@ -7,6 +7,8 @@ import typescript from 'rollup-plugin-typescript2';
|
||||
import { DEFAULT_EXTENSIONS as DEFAULT_BABEL_EXTENSIONS } from '@babel/core';
|
||||
import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import filesize from 'rollup-plugin-filesize';
|
||||
import alias from '@rollup/plugin-alias';
|
||||
|
||||
import pkg from './package.json';
|
||||
|
||||
@@ -76,6 +78,9 @@ export const baseConfig = ({ outputOptions = {}, injectCSS = true } = {}) => {
|
||||
output,
|
||||
|
||||
plugins: [
|
||||
alias({
|
||||
entries: [{ find: 'd3-color', replacement: __dirname + '/src/d3-color-alias' }],
|
||||
}),
|
||||
replace({
|
||||
__ENV__: JSON.stringify(processEnv),
|
||||
__REACT_FLOW_VERSION__: JSON.stringify(pkg.version),
|
||||
@@ -100,6 +105,7 @@ export const baseConfig = ({ outputOptions = {}, injectCSS = true } = {}) => {
|
||||
babelHelpers: 'runtime',
|
||||
}),
|
||||
visualizer(),
|
||||
filesize(),
|
||||
!isEsm && terser(),
|
||||
],
|
||||
};
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// this helps us to reduce bundle size by ~10kb. d3-color is not used but can't be treeshaked in this case.
|
||||
const obj = {};
|
||||
export const rgb = {};
|
||||
export const color = {};
|
||||
export const hsl = {};
|
||||
export const lab = {};
|
||||
export const hcl = {};
|
||||
export const cubehelix = {};
|
||||
export default obj;
|
||||
Reference in New Issue
Block a user