refactor(rollup): remove d3-color replacement

This commit is contained in:
moklick
2022-05-16 19:43:24 +02:00
parent 6ec76d2d58
commit dca1b6d7d6
4 changed files with 3 additions and 42 deletions
+2 -27
View File
@@ -1,12 +1,12 @@
{
"name": "react-flow-renderer",
"version": "10.2.3-next.0",
"version": "10.2.3-next.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "react-flow-renderer",
"version": "10.2.3-next.0",
"version": "10.2.3-next.1",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.17.9",
@@ -22,7 +22,6 @@
"@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",
@@ -2248,21 +2247,6 @@
"@octokit/openapi-types": "^11.2.0"
}
},
"node_modules/@rollup/plugin-alias": {
"version": "3.1.9",
"resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-3.1.9.tgz",
"integrity": "sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==",
"dev": true,
"dependencies": {
"slash": "^3.0.0"
},
"engines": {
"node": ">=8.0.0"
},
"peerDependencies": {
"rollup": "^1.20.0||^2.0.0"
}
},
"node_modules/@rollup/plugin-babel": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
@@ -13754,15 +13738,6 @@
"@octokit/openapi-types": "^11.2.0"
}
},
"@rollup/plugin-alias": {
"version": "3.1.9",
"resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-3.1.9.tgz",
"integrity": "sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==",
"dev": true,
"requires": {
"slash": "^3.0.0"
}
},
"@rollup/plugin-babel": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "react-flow-renderer",
"version": "10.2.3-next.0",
"version": "10.2.3-next.1",
"engines": {
"node": ">=14"
},
@@ -61,7 +61,6 @@
"@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",
-4
View File
@@ -8,7 +8,6 @@ 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';
@@ -78,9 +77,6 @@ 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),
-9
View File
@@ -1,9 +0,0 @@
// 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;