fix: _interopDefault potential cjs files

This commit is contained in:
Pooya Parsa 2021-01-21 15:46:05 +01:00
parent 0b886cf57f
commit 4f09b514f1

View File

@ -4,14 +4,16 @@ import config from './config'
// @ts-ignore // @ts-ignore
import { renderToString } from '~renderer' import { renderToString } from '~renderer'
// @ts-ignore // @ts-ignore
import server from '~build/dist/server/server' import createApp from '~build/dist/server/server'
// @ts-ignore // @ts-ignore
import clientManifest from '~build/dist/server/client.manifest.json' import clientManifest from '~build/dist/server/client.manifest.json'
// @ts-ignore // @ts-ignore
import htmlTemplate from '~build/views/document.template.js' import htmlTemplate from '~build/views/document.template.js'
const renderer = createRenderer(server, { function _interopDefault (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e } }
clientManifest,
const renderer = createRenderer(_interopDefault(createApp), {
clientManifest: _interopDefault(clientManifest),
renderToString renderToString
}) })