Skip to content

Commit f63898b

Browse files
authored
chore(web): change web build to produce esm instead of cjs COMPASS-9934 (#7432)
* chore(web): change web build to produce esm instead of cjs * chore(web): fix watch run type generation * fix(web): provide explicit public path to avoid import.meta usage issues in the sandbox * chore(webpack-config): fix type * chore(web): add comment
1 parent 77627fc commit f63898b

File tree

6 files changed

+791
-205
lines changed

6 files changed

+791
-205
lines changed

configs/webpack-config-compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"react-refresh": "^0.10.0",
8383
"source-map-loader": "^4.0.1",
8484
"style-loader": "^3.2.1",
85-
"webpack": "^5.94.0",
85+
"webpack": "^5.102.1",
8686
"webpack-bundle-analyzer": "^4.10.2",
8787
"webpack-cli": "^5.1.4",
8888
"webpack-dev-server": "^4.15.2",

configs/webpack-config-compass/src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,15 @@ export function createElectronRendererConfig(
282282
process.env.DISABLE_DEVSERVER_OVERLAY === 'true'
283283
? false
284284
: {
285-
runtimeErrors: (error) => {
285+
runtimeErrors: (error: unknown) => {
286286
// ResizeObserver errors are harmless and expected in some cases.
287287
// We currently get them when opening the Assistant drawer.
288288
if (
289-
error?.message ===
290-
'ResizeObserver loop completed with undelivered notifications.'
289+
error &&
290+
typeof error === 'object' &&
291+
'message' in error &&
292+
error.message ===
293+
'ResizeObserver loop completed with undelivered notifications.'
291294
) {
292295
// eslint-disable-next-line no-console
293296
console.warn(error);

0 commit comments

Comments
 (0)