mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
fix: use connect for dev server due to loading-screen issue
This commit is contained in:
parent
5bbdc2bc65
commit
e56178a872
@ -1,8 +1,8 @@
|
|||||||
import { Worker } from 'worker_threads'
|
import { Worker } from 'worker_threads'
|
||||||
|
import connect from 'connect'
|
||||||
import { resolve } from 'upath'
|
import { resolve } from 'upath'
|
||||||
import debounce from 'debounce'
|
import debounce from 'debounce'
|
||||||
import chokidar from 'chokidar'
|
import chokidar from 'chokidar'
|
||||||
import { createApp } from '@nuxt/h2'
|
|
||||||
import { listen, Listener } from 'listhen'
|
import { listen, Listener } from 'listhen'
|
||||||
import serveStatic from 'serve-static'
|
import serveStatic from 'serve-static'
|
||||||
import { createProxy } from 'http-proxy'
|
import { createProxy } from 'http-proxy'
|
||||||
@ -47,7 +47,7 @@ export function createDevServer (sigmaContext: SigmaContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// App
|
// App
|
||||||
const app = createApp()
|
const app = connect()
|
||||||
|
|
||||||
// _nuxt and static
|
// _nuxt and static
|
||||||
app.use(sigmaContext._nuxt.publicPath, serveStatic(resolve(sigmaContext._nuxt.buildDir, 'dist/client')))
|
app.use(sigmaContext._nuxt.publicPath, serveStatic(resolve(sigmaContext._nuxt.buildDir, 'dist/client')))
|
||||||
|
Loading…
Reference in New Issue
Block a user