-
Notifications
You must be signed in to change notification settings - Fork 295
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
[DDW-596] webpack 5 upgrade #2772
Conversation
# Conflicts: # .eslintrc # package.json # yarn.lock
By default webpack uses in-memory cache in development and no cache for production builds, which is exactly what we need.
…tput-hk/daedalus into chore/ddw-596-webpack-5-upgrade
fdde1bf
to
1890cd1
Compare
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.
Really amazing job!
if (existingChannel) | ||
throw new Error(`Channel ${channelName} already exists`); |
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.
Can we make sure this will not result in any side-effects?
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.
Is this related to the upgrade?
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.
source/main/ipc/hardwareWallets/ledger/deviceDetection/deviceDetection.ts
Show resolved
Hide resolved
@@ -77,7 +80,11 @@ export const createMainWindow = (locale: string, windowBounds?: Rectangle) => { | |||
if (event.sender !== window.webContents) return; | |||
window.close(); | |||
}); | |||
window.loadURL(`file://${__dirname}/../renderer/index.html`); | |||
if (isDev) { | |||
window.loadURL(`http://localhost:8080`); |
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.
Why do we have localhost hard coded?
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.
Because that's the webpack dev server - but i agree we could pass this as env var into the main process 👍 but i would do that in a separate PR tbh
@@ -0,0 +1,158 @@ | |||
import React, { useState, useCallback, useMemo } from 'react'; |
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.
File moved to source/renderer/app/components/wallet/tokens/wallet-tokens/WalletTokens.tsx
@@ -0,0 +1,232 @@ | |||
import React, { useState, useMemo, useCallback } from 'react'; |
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.
File moved to source/renderer/app/components/wallet/tokens/wallet-tokens-list/WalletTokensList.tsx
source/renderer/app/components/wallet/tokens/WalletTokensSearch.tsx
Outdated
Show resolved
Hide resolved
source/renderer/app/containers/wallet/PaperWalletCreateCertificatePage.tsx
Outdated
Show resolved
Hide resolved
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
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.
This file should have an .http
extension as it does not use any templating feature.
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.
you mean .html
right?
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.
Yes.
.http
- haha 🤣
… into chore/ddw-596-webpack-5-upgrade
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.
LGTM on all 4 builds: intel Mac, M1 Mac, Linux and Windows. Tested on 21914. Great work everyone 👍 (ps: Great job on fixing the M1 build @michalrus )
Thank you, everyone! 🙇 ✨ |
A miracle happened 🎉 thanks everyone for your precious contributions!! |
This PR updates Webpack 4 to 5 and introduces some DX improvements.
Todos
yarn dev
mode with react fast-refresh (Dominik)How to reproduce: move or resize the app window and reload the page with cmd + R -> the window jumps back into the previous place
node-sass
(deprecated) todart-sass
(Przemysław Włodek)Screenshots
css-fast-refresh.mp4
fast-refresh-components.mp4
Testing Checklist
Review Checklist
Basics
input-output-hk/daedalus-dev
andinput-output-hk/daedalus-qa
assigned as PR reviewersrun Chromatic
label to PR to trigger the run)release-vNext
,feature
/bug
/chore
,WIP
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review