Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Oct 25, 2024
1 parent 1262b08 commit 8dba364
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/slidev/node/vite/extendConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { join } from 'node:path'
import { fileURLToPath, pathToFileURL } from 'node:url'
import { slash, uniq } from '@antfu/utils'
import { createResolve } from 'mlly'
import { mergeConfig } from 'vite'
import { isInstalledGlobally, resolveImportPath, toAtFS } from '../resolver'

const INCLUDE_GLOBAL = [
Expand Down Expand Up @@ -67,7 +68,7 @@ export function createConfigPlugin(options: ResolvedSlidevOptions): Plugin {
})
return {
name: 'slidev:config',
async config() {
async config(config) {
const injection: UserConfig = {
define: options.utils.define,
resolve: {
Expand Down Expand Up @@ -183,7 +184,7 @@ export function createConfigPlugin(options: ResolvedSlidevOptions): Plugin {
// return nodeModuelsMatch[nodeModuelsMatch.length - 1][1]
// }

return injection
return mergeConfig(injection, config)
},
configureServer(server) {
// serve our index.html after vite history fallback
Expand Down

0 comments on commit 8dba364

Please sign in to comment.