-
Notifications
You must be signed in to change notification settings - Fork 574
Fix: Webpack fallback release config #3232
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
Conversation
✅ I was able to successfully run and log in (via WordPress.com) using the Mac artifact from this job. |
I also downloaded the Mac artifact and was able to log in. Can we find someone to test these on the Linux and Windows VMs? Assuming they work, @roundhill how do you feel about proceeding with this fix? |
I can be that someone, with real machines. 👍 |
@codebykat is starting the app and logging in enough to test for this change? |
Yes! If you're able to log in that definitely shows it has the correct config. |
Windows 64-bit installer: ✅ |
Here's an approach for loading the config for webback from the file system:
This fixed the issue where |
Ugh. I've updated this PR to have webpack require I included a package upgrade as I got a notification about a high risk vulnerability in Once the artifacts build and we have tested them on all platforms, I think we've got our next (and hopefully final??) release candidate. |
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.
Overall working well, I saw a weird thing with the webpack target
for a while...
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.
Our config woes seem resolved 😅
- Build works with and without
config-local.json
present - Sign-in works on both web and electron builds
const config = getConfig(); | ||
if (config.is_app_engine) { |
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.
What happens here?
With my limited Electron + Webpack + TS understanding, I think at this point config
would be undefined
, making the if below unreachable. Unless... config
is somehow injected?
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.
It's because config
is actually set as a Webpack plugin, defined here:
simplenote-electron/webpack.config.js
Line 157 in 13cb5d1
config: JSON.stringify(config), |
With my limited knowledge that is why it exists everywhere :)
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.
Yep exactly, as long as you don't define it inside the file, webpack will inject it. (If it IS defined in the file then webpack will assume you want a locally-defined version instead.)
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.
Thanks for the info @roundhill @codebykat
@codebykat @roundhill I update the target branch for this PR to |
Fix
Alternative to #3231, trying to see if this fixes the build artifacts.
Ref: https://medium.com/@6465660/webpack-compilation-error-critical-dependency-the-request-of-a-dependency-is-an-expression-13350139f2a5
And I'm mad about it 😠