Skip to content

Commit

Permalink
fix: dependencies issues with vite global install
Browse files Browse the repository at this point in the history
  • Loading branch information
kamuiiiii committed Mar 13, 2024
1 parent 748f8bb commit 0a13e30
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions packages/slidev/node/vite/extendConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,6 @@ import { uniq } from '@antfu/utils'
import type { ResolvedSlidevOptions } from '@slidev/types'
import { getIndexHtml } from '../commands/shared'
import { resolveImportPath, toAtFS } from '../resolver'
import { dependencies } from '../../../client/package.json'

const INCLUDE = [
...Object.keys(dependencies),

// CodeMirror
'codemirror/mode/javascript/javascript',
'codemirror/mode/css/css',
'codemirror/mode/markdown/markdown',
'codemirror/mode/xml/xml',
'codemirror/mode/htmlmixed/htmlmixed',
'codemirror/addon/display/placeholder',

// Monaco
'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices',
'monaco-editor/esm/vs/platform/contextview/browser/contextViewService',
'monaco-editor/esm/vs/platform/instantiation/common/descriptors',

// Others
'shiki-magic-move/vue',
]

const EXCLUDE = [
'@slidev/shared',
Expand Down Expand Up @@ -80,10 +59,6 @@ export function createConfigPlugin(options: ResolvedSlidevOptions): Plugin {
},
optimizeDeps: {
exclude: EXCLUDE,
include: INCLUDE
.filter(i => !EXCLUDE.includes(i))
// We need to specify the full deps path for non-hoisted modules
.map(i => `@slidev/cli > @slidev/client > ${i}`),
},
css: options.data.config.css === 'unocss'
? {
Expand Down

0 comments on commit 0a13e30

Please sign in to comment.