diff --git a/bin/electron-vite.js b/bin/electron-vite.js index e5d8d89..64a70d0 100644 --- a/bin/electron-vite.js +++ b/bin/electron-vite.js @@ -24,7 +24,7 @@ if (debugIndex > 0) { } function run() { - import('../dist/cli.mjs') + import('../dist/cli.js') } run() diff --git a/package.json b/package.json index 4bebd0d..0c78e67 100644 --- a/package.json +++ b/package.json @@ -3,15 +3,10 @@ "version": "3.1.0", "description": "Electron build tooling based on Vite", "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.mjs", - "require": "./dist/index.cjs" - }, + ".": "./dist/index.js", "./node": { "types": "./node.d.ts" }, @@ -66,7 +61,7 @@ }, "peerDependencies": { "@swc/core": "^1.0.0", - "vite": "^4.0.0 || ^5.0.0 || ^6.0.0" + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "peerDependenciesMeta": { "@swc/core": { @@ -93,7 +88,7 @@ "tslib": "^2.8.1", "typescript": "^5.8.3", "typescript-eslint": "^8.35.0", - "vite": "^6.3.5" + "vite": "^7.0.0" }, "dependencies": { "@babel/core": "^7.27.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ce1ab34..aedf873 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,8 +85,8 @@ importers: specifier: ^8.35.0 version: 8.35.0(eslint@9.29.0)(typescript@5.8.3) vite: - specifier: ^6.3.5 - version: 6.3.5(@types/node@22.15.33)(yaml@2.8.0) + specifier: ^7.0.0 + version: 7.0.0(@types/node@22.15.33)(yaml@2.8.0) packages: @@ -1367,19 +1367,19 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - vite@6.3.5: - resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vite@7.0.0: + resolution: {integrity: sha512-ixXJB1YRgDIw2OszKQS9WxGHKwLdCsbQNkpJN171udl6szi/rIySHL6/Os3s2+oE4P/FLD4dxg4mD7Wust+u5g==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@types/node': ^20.19.0 || >=22.12.0 jiti: '>=1.21.0' - less: '*' + less: ^4.0.0 lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 terser: ^5.16.0 tsx: ^4.8.1 yaml: ^2.4.2 @@ -2596,7 +2596,7 @@ snapshots: dependencies: punycode: 2.3.1 - vite@6.3.5(@types/node@22.15.33)(yaml@2.8.0): + vite@7.0.0(@types/node@22.15.33)(yaml@2.8.0): dependencies: esbuild: 0.25.5 fdir: 6.4.6(picomatch@4.0.2) diff --git a/rollup.config.ts b/rollup.config.ts index 44e0af0..0cc5d61 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -17,14 +17,8 @@ export default defineConfig([ output: [ { dir: 'dist', - entryFileNames: '[name].cjs', - chunkFileNames: 'chunks/lib-[hash].cjs', - format: 'cjs' - }, - { - dir: 'dist', - entryFileNames: '[name].mjs', - chunkFileNames: 'chunks/lib-[hash].mjs', + entryFileNames: '[name].js', + chunkFileNames: 'chunks/lib-[hash].js', format: 'es' } ], diff --git a/src/index.ts b/src/index.ts index 11a51a0..2275c86 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -export { type LogLevel, createLogger, mergeConfig, splitVendorChunkPlugin, splitVendorChunk } from 'vite' +export { type LogLevel, createLogger, mergeConfig } from 'vite' export * from './config' export { createServer } from './server' export { build } from './build'