refactor(rollup): remove d3-color replacement
This commit is contained in:
Generated
+2
-27
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "react-flow-renderer",
|
"name": "react-flow-renderer",
|
||||||
"version": "10.2.3-next.0",
|
"version": "10.2.3-next.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "react-flow-renderer",
|
"name": "react-flow-renderer",
|
||||||
"version": "10.2.3-next.0",
|
"version": "10.2.3-next.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.9",
|
"@babel/runtime": "^7.17.9",
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
"@babel/preset-env": "^7.17.10",
|
"@babel/preset-env": "^7.17.10",
|
||||||
"@babel/preset-react": "^7.16.7",
|
"@babel/preset-react": "^7.16.7",
|
||||||
"@babel/preset-typescript": "^7.16.7",
|
"@babel/preset-typescript": "^7.16.7",
|
||||||
"@rollup/plugin-alias": "^3.1.9",
|
|
||||||
"@rollup/plugin-babel": "^5.3.1",
|
"@rollup/plugin-babel": "^5.3.1",
|
||||||
"@rollup/plugin-commonjs": "^22.0.0",
|
"@rollup/plugin-commonjs": "^22.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^13.2.1",
|
"@rollup/plugin-node-resolve": "^13.2.1",
|
||||||
@@ -2248,21 +2247,6 @@
|
|||||||
"@octokit/openapi-types": "^11.2.0"
|
"@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": {
|
"node_modules/@rollup/plugin-babel": {
|
||||||
"version": "5.3.1",
|
"version": "5.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
|
||||||
@@ -13754,15 +13738,6 @@
|
|||||||
"@octokit/openapi-types": "^11.2.0"
|
"@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": {
|
"@rollup/plugin-babel": {
|
||||||
"version": "5.3.1",
|
"version": "5.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-flow-renderer",
|
"name": "react-flow-renderer",
|
||||||
"version": "10.2.3-next.0",
|
"version": "10.2.3-next.1",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
@@ -61,7 +61,6 @@
|
|||||||
"@babel/preset-env": "^7.17.10",
|
"@babel/preset-env": "^7.17.10",
|
||||||
"@babel/preset-react": "^7.16.7",
|
"@babel/preset-react": "^7.16.7",
|
||||||
"@babel/preset-typescript": "^7.16.7",
|
"@babel/preset-typescript": "^7.16.7",
|
||||||
"@rollup/plugin-alias": "^3.1.9",
|
|
||||||
"@rollup/plugin-babel": "^5.3.1",
|
"@rollup/plugin-babel": "^5.3.1",
|
||||||
"@rollup/plugin-commonjs": "^22.0.0",
|
"@rollup/plugin-commonjs": "^22.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^13.2.1",
|
"@rollup/plugin-node-resolve": "^13.2.1",
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { DEFAULT_EXTENSIONS as DEFAULT_BABEL_EXTENSIONS } from '@babel/core';
|
|||||||
import { visualizer } from 'rollup-plugin-visualizer';
|
import { visualizer } from 'rollup-plugin-visualizer';
|
||||||
import { terser } from 'rollup-plugin-terser';
|
import { terser } from 'rollup-plugin-terser';
|
||||||
import filesize from 'rollup-plugin-filesize';
|
import filesize from 'rollup-plugin-filesize';
|
||||||
import alias from '@rollup/plugin-alias';
|
|
||||||
|
|
||||||
import pkg from './package.json';
|
import pkg from './package.json';
|
||||||
|
|
||||||
@@ -78,9 +77,6 @@ export const baseConfig = ({ outputOptions = {}, injectCSS = true } = {}) => {
|
|||||||
output,
|
output,
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
alias({
|
|
||||||
entries: [{ find: 'd3-color', replacement: __dirname + '/src/d3-color-alias' }],
|
|
||||||
}),
|
|
||||||
replace({
|
replace({
|
||||||
__ENV__: JSON.stringify(processEnv),
|
__ENV__: JSON.stringify(processEnv),
|
||||||
__REACT_FLOW_VERSION__: JSON.stringify(pkg.version),
|
__REACT_FLOW_VERSION__: JSON.stringify(pkg.version),
|
||||||
|
|||||||
Vendored
-9
@@ -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;
|
|
||||||
Reference in New Issue
Block a user