mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
feat: external dependencies
This commit is contained in:
parent
252a5eefed
commit
fc93d313fa
@ -1,6 +1,7 @@
|
||||
import { join } from 'path'
|
||||
import { builtinModules } from 'module'
|
||||
import { defineConfig } from 'vite'
|
||||
import pkg from '../package.json'
|
||||
|
||||
export default defineConfig({
|
||||
mode: process.env.NODE_ENV,
|
||||
@ -15,8 +16,9 @@ export default defineConfig({
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
external: [
|
||||
...builtinModules,
|
||||
'electron',
|
||||
...builtinModules,
|
||||
...Object.keys((pkg as Record<string, any>).dependencies || {}),
|
||||
],
|
||||
output: {
|
||||
entryFileNames: '[name].cjs',
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { join } from 'path'
|
||||
import { builtinModules } from 'module'
|
||||
import { defineConfig } from 'vite'
|
||||
import pkg from '../package.json'
|
||||
|
||||
export default defineConfig({
|
||||
mode: process.env.NODE_ENV,
|
||||
@ -15,8 +16,9 @@ export default defineConfig({
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
external: [
|
||||
...builtinModules,
|
||||
'electron',
|
||||
...builtinModules,
|
||||
...Object.keys((pkg as Record<string, any>).dependencies || {}),
|
||||
],
|
||||
output: {
|
||||
entryFileNames: '[name].cjs',
|
||||
|
Loading…
x
Reference in New Issue
Block a user