-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
fix(vite-template): fix vite template start failed after package #3713
Conversation
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
32c3f1c
to
28e5546
Compare
let's merge this bad boy |
28e5546
to
94fdba5
Compare
PTAL @electron/forgers |
@caoxiemeihao can you explain the changes you’ve made to the type declarations code? |
hey, this pr removed the vite-forge type declarations in i think the packaging process is not including the i added the file and now the reference |
ah looks like the vite const type declarations were fixed in 3ad7485 but haven't been released yet which fixed the |
Summarize your changes:
Closes #3714
Since we removed the copy
dependencies
logic in vite-plugin ofv7.5.0
, this will causeif (require('electron-squirrel-startup'))
to fail to load.This is because Vite's built-in
@rollup/plugin-commonjs
cannot handle CommonJS'srequire()
function like Webpack in many cases. We need to make some compromises in code writing and try to use ESModule'simport
statement to avoid this problem.