Skip to content

Commit 5fca601

Browse files
committed
fix(react)!: disable includeImportCustomElements to resolve initial render issues (#8248)
**Related Issue:** #8143 ## Summary The `ReferenceError: navigator is not defined` error is still present in Stencil v4 when removing the patch. Disabled [`includeImportCustomElements`](https://stenciljs.com/docs/react#includeimportcustomelements) for now while we investigate an alternative fix that doesn't cause initial render issues. BREAKING CHANGE: Disabled `includeImportCustomElements`. Make sure to import components from `@esri/calcite-components` in addition to the react wrappers. For example, the first code snippet in #7185 is now required, or else the custom elements will not be defined on the window.
1 parent a512045 commit 5fca601

File tree

3 files changed

+1
-68
lines changed

3 files changed

+1
-68
lines changed

packages/calcite-components-react/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
"license": "SEE LICENSE.md",
88
"scripts": {
99
"build": "rimraf dist && npm run compile",
10-
"prebuild": "npm run patch:ssr && npm run patch:jsx-import",
10+
"prebuild": "npm run patch:jsx-import",
1111
"clean": "rimraf dist node_modules .turbo",
1212
"compile": "npm run tsc",
1313
"patch:jsx-import": "ts-node support/patchJSXImport.ts",
14-
"patch:ssr": "ts-node support/patchSSR.ts",
1514
"tsc": "tsc"
1615
},
1716
"main": "./dist/index.js",

packages/calcite-components-react/support/patchSSR.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

packages/calcite-components/stencil.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export const create: () => Config = () => ({
9797
proxiesFile: "../calcite-components-react/src/components.ts",
9898
excludeComponents: ["context-consumer"],
9999
customElementsDir: "dist/components",
100-
includeImportCustomElements: true,
101100
}),
102101
{ type: "dist-hydrate-script" },
103102
{ type: "dist-custom-elements", customElementsExportBehavior: "auto-define-custom-elements" },

0 commit comments

Comments
 (0)