-
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.
Breaking Changes: remove esbuild for renderer
- Loading branch information
Showing
60 changed files
with
375 additions
and
1,338 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
### Breaking Changes | ||
|
||
- change to pure ESM | ||
- remove esbuild as renderer bundler | ||
|
||
### Changes | ||
|
||
|
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
23 changes: 16 additions & 7 deletions
23
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,15 +1,24 @@ | ||
import { BuildOptions } from 'esbuild' | ||
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, | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
import * as path from 'node:path' | ||
|
||
/** @var {Partial<import('esbuild').BuildOptions>} */ | ||
export default { | ||
/** @var {import('esbuild').BuildOptions} */ | ||
const main = { | ||
platform: 'node', | ||
entryPoints: [ | ||
path.resolve('src/main/main.js'), | ||
path.resolve('src/main/preload.js'), | ||
], | ||
entryPoints: [path.resolve('src/main/main.js')], | ||
bundle: true, | ||
format: 'esm', | ||
target: 'node20.11.1', // electron version target | ||
} | ||
|
||
/** @var {import('esbuild').BuildOptions} */ | ||
const preload = { | ||
platform: 'node', | ||
entryPoints: [path.resolve('src/main/preload.js')], | ||
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 was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
packages/create-app/templates/react-ts/electron-esbuild.config.yaml
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
packages/create-app/templates/react-ts/esbuild.main.config.ts
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/create-app/templates/react-ts/esbuild.renderer.config.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
packages/create-app/templates/react-ts/src/renderer/App.tsx
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
packages/create-app/templates/react-ts/src/renderer/index.css
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
packages/create-app/templates/react-ts/src/renderer/index.html
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/create-app/templates/react-ts/src/renderer/index.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.