Compare commits

..

No commits in common. "master" and "v3.0.0-beta.0" have entirely different histories.

5 changed files with 410 additions and 446 deletions

View File

@ -1,16 +1,4 @@
### v3.1.0 (_2025-03-25_) ### v3.0.0-beta.0 (_2025-01-22_)
- fix(bytecodePlugin): optimize 'use strict' directive replacement ([#681](https://github.com/alex8088/electron-vite/issues/681))
- perf: build compatilibity target for Electron 35 ([#729](https://github.com/alex8088/electron-vite/pull/729))
- chore(deps): update all non-major dependencies
- chore(deps): update globals to v16
- chore(deps): update esbuild to v0.25
### v3.1.0-beta.0 (_2025-03-12_)
See [v3.1.0-beta.0 changelog](https://github.com/alex8088/electron-vite/blob/v3.1.0-beta.0/CHANGELOG.md)
### v3.0.0 (_2025-02-16_)
- feat: resolve conditions for preload - feat: resolve conditions for preload
- perf: build compatilibity target for Electron 32 - perf: build compatilibity target for Electron 32
@ -24,10 +12,6 @@ See [v3.1.0-beta.0 changelog](https://github.com/alex8088/electron-vite/blob/v3.
- chore(deps): update vite to v6 - chore(deps): update vite to v6
- chore(deps): update @type/node to v22 - chore(deps): update @type/node to v22
### v3.0.0-beta.0 (_2025-01-22_)
See [v3.0.0-beta.0 changelog](https://github.com/alex8088/electron-vite/blob/v3.0.0-beta.0/CHANGELOG.md)
### v2.3.0 (_2024-06-23_) ### v2.3.0 (_2024-06-23_)
- feat: resolve import.meta.\[dirname|filename\] to support CommonJS format - feat: resolve import.meta.\[dirname|filename\] to support CommonJS format

View File

@ -1,6 +1,6 @@
{ {
"name": "electron-vite", "name": "electron-vite",
"version": "3.1.0", "version": "3.0.0-beta.0",
"description": "Electron build tooling based on Vite", "description": "Electron build tooling based on Vite",
"type": "module", "type": "module",
"main": "dist/index.cjs", "main": "dist/index.cjs",
@ -74,32 +74,32 @@
} }
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.22.0", "@eslint/js": "^9.18.0",
"@rollup/plugin-json": "^6.1.0", "@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.1.2", "@rollup/plugin-typescript": "^12.1.2",
"@swc/core": "^1.11.9", "@swc/core": "^1.10.9",
"@types/node": "^22.13.10", "@types/node": "^22.10.7",
"eslint": "^9.22.0", "eslint": "^9.18.0",
"eslint-config-prettier": "^10.1.1", "eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.3", "eslint-plugin-prettier": "^5.2.3",
"globals": "^16.0.0", "globals": "^15.14.0",
"lint-staged": "^15.4.3", "lint-staged": "^15.4.1",
"prettier": "^3.5.3", "prettier": "^3.4.2",
"rollup": "^4.35.0", "rollup": "^4.31.0",
"rollup-plugin-dts": "^6.1.1", "rollup-plugin-dts": "^6.1.1",
"rollup-plugin-rm": "^1.0.2", "rollup-plugin-rm": "^1.0.2",
"simple-git-hooks": "^2.11.1", "simple-git-hooks": "^2.11.1",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.7.3", "typescript": "^5.7.3",
"typescript-eslint": "^8.26.1", "typescript-eslint": "^8.21.0",
"vite": "^6.2.1" "vite": "^6.0.11"
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.26.10", "@babel/core": "^7.26.0",
"@babel/plugin-transform-arrow-functions": "^7.25.9", "@babel/plugin-transform-arrow-functions": "^7.25.9",
"cac": "^6.7.14", "cac": "^6.7.14",
"esbuild": "^0.25.1", "esbuild": "^0.24.2",
"magic-string": "^0.30.17", "magic-string": "^0.30.17",
"picocolors": "^1.1.1" "picocolors": "^1.1.1"
} }

802
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -69,7 +69,6 @@ export function getElectronNodeTarget(): string {
const electronVer = getElectronMajorVer() const electronVer = getElectronMajorVer()
const nodeVer = { const nodeVer = {
'35': '22.14',
'34': '20.18', '34': '20.18',
'33': '20.18', '33': '20.18',
'32': '20.16', '32': '20.16',
@ -103,7 +102,6 @@ export function getElectronChromeTarget(): string {
const electronVer = getElectronMajorVer() const electronVer = getElectronMajorVer()
const chromeVer = { const chromeVer = {
'35': '134',
'34': '132', '34': '132',
'33': '130', '33': '130',
'32': '128', '32': '128',

View File

@ -344,9 +344,7 @@ export function bytecodePlugin(options: BytecodeOptions = {}): Plugin | null {
} }
} }
const bytecodeLoaderBlock = getBytecodeLoaderBlock(chunk.fileName) const bytecodeLoaderBlock = getBytecodeLoaderBlock(chunk.fileName)
_code = hasBytecodeMoudle _code = hasBytecodeMoudle ? _code.replace(useStrict, `${useStrict}\n${bytecodeLoaderBlock}`) : _code
? _code.replace(/("use strict";)|('use strict';)/, `${useStrict}\n${bytecodeLoaderBlock}`)
: _code
} }
fs.writeFileSync(chunkFileName, _code) fs.writeFileSync(chunkFileName, _code)
} }