2020-11-20 00:16:31 +00:00
|
|
|
import consola from 'consola'
|
|
|
|
import { extendPreset, hl, prettyPath } from '../utils'
|
|
|
|
import { SigmaPreset, SigmaContext } from '../context'
|
|
|
|
import { node } from './node'
|
|
|
|
|
|
|
|
export const server: SigmaPreset = extendPreset(node, {
|
|
|
|
entry: '{{ _internal.runtimeDir }}/entries/server',
|
|
|
|
externals: false,
|
|
|
|
inlineChunks: false,
|
2020-11-28 22:49:39 +00:00
|
|
|
serveStatic: true,
|
|
|
|
minify: false,
|
2020-11-20 00:16:31 +00:00
|
|
|
hooks: {
|
|
|
|
'sigma:compiled' ({ output }: SigmaContext) {
|
|
|
|
consola.success('Ready to run', hl('node ' + prettyPath(output.serverDir)))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|