fix: use connect for dev server due to loading-screen issue

This commit is contained in:
Pooya Parsa 2020-12-12 15:20:55 +01:00
parent 5bbdc2bc65
commit e56178a872

View File

@ -1,8 +1,8 @@
import { Worker } from 'worker_threads'
import connect from 'connect'
import { resolve } from 'upath'
import debounce from 'debounce'
import chokidar from 'chokidar'
import { createApp } from '@nuxt/h2'
import { listen, Listener } from 'listhen'
import serveStatic from 'serve-static'
import { createProxy } from 'http-proxy'
@ -47,7 +47,7 @@ export function createDevServer (sigmaContext: SigmaContext) {
}
// App
const app = createApp()
const app = connect()
// _nuxt and static
app.use(sigmaContext._nuxt.publicPath, serveStatic(resolve(sigmaContext._nuxt.buildDir, 'dist/client')))