-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: bundle main+preload as ES #15544
base: develop
Are you sure you want to change the base?
Conversation
// 'bufferutil', // optional dependency of ws lib | ||
// 'memcpy', // optional depencency of bytebuffer lib | ||
// 'utf-8-validate', // optional dependency of ws lib | ||
// 'osx-temperature-sensor', // optional dependency of systeminformation lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all sub-dependencies that are only optionally required by our dependencies, example.
When specified in externals
, webpack will try to provide them, but it crashes at run time when output target is ES. I don't know if any actual suite functionality relies on those libs.
@@ -112,6 +113,8 @@ const config: webpack.Configuration = { | |||
alias: { | |||
'@emurgo/cardano-serialization-lib-nodejs': '@emurgo/cardano-serialization-lib-browser', | |||
'@trezor/connect$': '@trezor/connect/src/index', // alternative for "module": "src/index" in connect's package.json | |||
// optional dependency of systeminformation lib mocked as undefined (webpack needs it when targetting ES) | |||
'osx-temperature-sensor': false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unlike other deps in externals
, this one needs to be mocked as undefined, otherwise webpack crashes during building the desktop core @trezor/suite-desktop-core build:app:dev
Description
Does not work 😞
Thoughts? 💭
renderer
vite
orrollup
supports chunking too, and has first-class support for ESRelated Issue
Attempt to resolve #14482