Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions packages/start-plugin-core/src/dev-server-plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,9 @@ declare global {
}

export function devServerPlugin(): Plugin {
// let config: UserConfig
let isTest = false

return {
name: 'start-dev-ssr-plugin',
config(userConfig, { mode }) {
// config = userConfig
isTest = isTest ? isTest : mode === 'test'
// see https://vite.dev/config/shared-options.html#apptype
// this will prevent vite from injecting middlewares that we don't want
userConfig.appType = 'custom'
},
async configureServer(viteDevServer) {
if (isTest) {
return
}

// Extract the scripts that Vite plugins would inject into the initial HTML
const templateHtml = `<html><head></head><body></body></html>`
const transformedHtml = await viteDevServer.transformIndexHtml(
Expand Down