mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-09 17:51:46 +00:00
feat: enable the ESM for main (#3588)
This commit is contained in:
@ -35,15 +35,16 @@ export default defineConfig({
|
||||
}),
|
||||
],
|
||||
publicDir: 'assets',
|
||||
define: {
|
||||
'__dirname': 'import.meta.dirname',
|
||||
'__filename': 'import.meta.filename',
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: 'src/index.ts',
|
||||
formats: ['cjs'],
|
||||
formats: ['es'],
|
||||
},
|
||||
outDir: 'dist/main',
|
||||
commonjsOptions: {
|
||||
ignoreDynamicRequires: true,
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['electron', 'custom-electron-prompt', ...builtinModules],
|
||||
input: './src/index.ts',
|
||||
@ -148,9 +149,6 @@ export default defineConfig({
|
||||
name: 'renderer',
|
||||
},
|
||||
outDir: 'dist/renderer',
|
||||
commonjsOptions: {
|
||||
ignoreDynamicRequires: true,
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['electron', ...builtinModules],
|
||||
input: './src/index.html',
|
||||
|
||||
Reference in New Issue
Block a user