Nuxt/packages/nitro/src/presets/worker.ts

14 lines
347 B
TypeScript
Raw Normal View History

2021-01-22 19:55:59 +00:00
import { NitroPreset, NitroContext } from '../context'
2020-11-20 00:16:31 +00:00
2021-01-22 19:55:59 +00:00
export const worker: NitroPreset = {
2020-11-20 00:16:31 +00:00
entry: null, // Abstract
node: false,
minify: true,
inlineDynamicImports: true, // iffe does not support code-splitting
2020-11-20 00:16:31 +00:00
hooks: {
2021-01-22 19:55:59 +00:00
'nitro:rollup:before' ({ rollupConfig }: NitroContext) {
2020-11-20 00:16:31 +00:00
rollupConfig.output.format = 'iife'
}
}
}