Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some bug in v0.8.4 #51

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Conversation

Beiluola
Copy link

@Beiluola Beiluola commented Aug 8, 2022

  1. feat: add VITE_DEV_SERVER_URL to electron
    process env, so that it is easier to use

  2. fix(馃悶): VITE_DEV_SERVER_HOST cannot be used directly when
    VITE_DEV_SERVER_HOST is a ipv6 address or
    vite config server.host is true

  3. fix(馃悶): use vite config mode as default build
    mode to avoid build mode not equal to vite config mode when
    vite config mode !== 'development' which would lead to render env
    not equal to electron main or preload

  4. fix(馃悶): build electron output after render to avoid the electron
    output being deleted when the vite config emptyOutDir
    is true and the vite command is build

  5. fix(馃悶): use closeBundle to replace writeBundle, because in
    extreme cases, an error will be reported. For example,
    can't find preload module will occur as an error
    when preload update frequently

process env, so that it is easier to use

2. fix(馃悶): VITE_DEV_SERVER_HOST cannot be used directly when
VITE_DEV_SERVER_HOST is a ipv6 address or
vite config `server.host` is true

3. fix(馃悶): use vite config `mode` as default build
mode to avoid build mode not equal to vite config `mode` when
vite config `mode` !== 'development' which would lead to render env
not equal to electron main or preload

4. fix(馃悶): build electron output after render to avoid the electron
output being deleted when the vite config emptyOutDir
is `true` and the vite command is `build`

5. fix(馃悶): use `closeBundle` to replace `writeBundle`, because in
extreme cases, an error will be reported. For example,
`can't find preload module` will occur as an error
when `preload` update frequently
@Beiluola Beiluola mentioned this pull request Aug 8, 2022
@caoxiemeihao caoxiemeihao self-requested a review August 8, 2022 02:24
title: 'Main window',
})

if (process.env.VITE_DEV_SERVER_URL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need wizard spelling in electron main.ts

process.env['VITE_DEV_SERVER_URL']

vitejs/vite#8843 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caoxiemeihao caoxiemeihao merged commit 3cf4884 into electron-vite:main Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants