Skip to content

Commit

Permalink
fix: revert to RTDC 5.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PalmDevs committed Oct 11, 2024
1 parent 661b2a4 commit 507abf7
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 19 deletions.
13 changes: 0 additions & 13 deletions build.ts

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
14 changes: 11 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import * as reactDevToolsCore from "react-devtools-core";

// TODO: Fix 6.0.0, this is one step in the right direction
// reactDevToolsCore.initialize({
// appendComponentStack: true,
// breakOnConsoleErrors: false,
// showInlineWarningsAndErrors: true,
// hideConsoleLogsInStrictMode: false,
// });

globalThis.__reactDevTools = {
version: __RDTC_VERSION, // Sync with package.json
exports: reactDevToolsCore
};
version: __RDTC_VERSION,
exports: reactDevToolsCore,
};
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
"module": "dist/index.js",
"type": "module",
"scripts": {
"build": "bun run build.ts"
"build": "rollup --config rollup.config.mjs"
},
"devDependencies": {
"esbuild": "^0.24.0"
"@rollup/plugin-node-resolve": "^15.3.0",
"rollup": "^4.24.0",
"rollup-plugin-esbuild": "^6.1.1"
},
"dependencies": {
"react-devtools-core": "^6.0.0"
"react-devtools-core": "5.3.1",
"rollup-plugin-define": "^1.0.1"
}
}
25 changes: 25 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import nodeResolve from "@rollup/plugin-node-resolve";
import esbuild from "rollup-plugin-esbuild";
import define from 'rollup-plugin-define';
import commonJs from '@rollup/plugin-commonjs';
import rdtPkg from './node_modules/react-devtools-core/package.json' with { type: 'json' };

export default {
input: 'index.js',
output: {
file: 'dist/index.js',
format: 'iife',
compact: true,
intro: "var window = globalThis, self = globalThis, console = new Proxy({}, { get: () => () => void 0 }), setTimeout = (x) => x();"
},
plugins: [
nodeResolve(),
commonJs(),
define({
replacements: {
__RDTC_VERSION: `"${rdtPkg.version}"`
}
}),
esbuild({ minify: true })
]
};

0 comments on commit 507abf7

Please sign in to comment.