diff --git a/package-lock.json b/package-lock.json index 4e70a4f3ba..5d85c44479 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17395,8 +17395,12 @@ }, "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.2.0", - "d3-format": "^1", - "d3-selection": "^1" + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" } }, "packages/layout": { diff --git a/packages/html/esbuild.js b/packages/html/esbuild.js index 67b91a9988..b3dcf1d43b 100644 --- a/packages/html/esbuild.js +++ b/packages/html/esbuild.js @@ -24,6 +24,7 @@ await Promise.all([ }, external: [ ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.peerDependencies), ] }) ]); diff --git a/packages/html/index.html b/packages/html/index.html new file mode 100644 index 0000000000..5342205e5b --- /dev/null +++ b/packages/html/index.html @@ -0,0 +1,82 @@ + + + + + Home + + + + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/html/package.json b/packages/html/package.json index dfe44ceca9..c030fbbef1 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -42,7 +42,13 @@ "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.2.0", "d3-format": "^1", - "d3-selection": "^1" + "d3-selection": "^1", + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" }, "repository": { "type": "git", diff --git a/packages/html/src/VizComponent.tsx b/packages/html/src/VizComponent.tsx index 83b85b1ad9..a38f1dc73a 100644 --- a/packages/html/src/VizComponent.tsx +++ b/packages/html/src/VizComponent.tsx @@ -1,4 +1,4 @@ -import * as React from "@hpcc-js/preact-shim"; +import React from "react"; import { JSXWidget } from "./JSXWidget.ts"; export class VizComponent extends JSXWidget.Component { diff --git a/packages/html/src/VizInstance.tsx b/packages/html/src/VizInstance.tsx index a3a5a79230..f7f2135f99 100644 --- a/packages/html/src/VizInstance.tsx +++ b/packages/html/src/VizInstance.tsx @@ -1,4 +1,4 @@ -import * as React from "@hpcc-js/preact-shim"; +import React from "react"; import { JSXWidget } from "./JSXWidget.ts"; export class VizInstance extends JSXWidget.Component {