-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update for electron@30 and vite@5 (#57)
* feat: update for electron@30 and vite@5 * feat: esbuild multiple main config Breaking Changes: remove esbuild for renderer
- Loading branch information
Showing
122 changed files
with
2,107 additions
and
2,233 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.run/create-electron-esbuild-app var.run.xml → .run/create-app var.run.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
packages/create-app/src/enums/template.mts → packages/create-app/src/enums/template.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/create-app/src/helpers/filename.mts → packages/create-app/src/helpers/filename.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
packages/create-app/src/helpers/fs.mts → packages/create-app/src/helpers/fs.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
...e-app/src/helpers/get-package-manager.mts → ...te-app/src/helpers/get-package-manager.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
4 changes: 2 additions & 2 deletions
4
...eate-app/src/helpers/get-template-dir.mts → ...reate-app/src/helpers/get-template-dir.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/create-app/src/helpers/git.mts → packages/create-app/src/helpers/git.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
...create-app/src/helpers/is-path-exists.mts → .../create-app/src/helpers/is-path-exists.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
6 changes: 2 additions & 4 deletions
6
...ate-app/src/helpers/is-template-valid.mts → ...eate-app/src/helpers/is-template-valid.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/create-app/src/helpers/log.mts → packages/create-app/src/helpers/log.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
...e-app/src/helpers/read-json-from-file.mts → ...te-app/src/helpers/read-json-from-file.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/create-app/src/types/package.mts → packages/create-app/src/types/package.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022 Kiyozz. | ||
* Copyright (c) 2024 Kiyozz. | ||
* | ||
* All rights reserved. | ||
*/ | ||
|
28 changes: 19 additions & 9 deletions
28
packages/create-app/templates/main-ts/esbuild.main.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
import { BuildOptions } from 'esbuild' | ||
import * as path from 'path' | ||
import type { BuildOptions } from 'esbuild' | ||
import * as path from 'node:path' | ||
|
||
const config: BuildOptions = { | ||
const main: BuildOptions = { | ||
platform: 'node', | ||
entryPoints: [ | ||
path.resolve('src/main/main.ts'), | ||
path.resolve('src/main/preload.ts'), | ||
], | ||
entryPoints: [path.resolve('src/main/main.ts')], | ||
bundle: true, | ||
target: 'node18.15.0', // electron version target | ||
format: 'esm', | ||
target: 'node20.11.1', // electron version target | ||
} | ||
|
||
export default config | ||
const preload: BuildOptions = { | ||
platform: 'node', | ||
entryPoints: [path.resolve('src/main/preload.ts')], | ||
bundle: true, | ||
format: 'esm', | ||
target: 'node20.11.1', // electron version target | ||
// it is important to use .mjs extension for preload script because of how electron load preload script | ||
outExtension: { | ||
'.js': '.mjs', | ||
} | ||
} | ||
|
||
export default [main, preload] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.