|
1 | 1 | import { pathToFileURL } from 'node:url' |
2 | 2 | import { existsSync } from 'node:fs' |
| 3 | +import { writeFile } from 'node:fs/promises' |
3 | 4 | import { builtinModules } from 'node:module' |
4 | 5 | import { isAbsolute, normalize, resolve } from 'pathe' |
5 | 6 | import type * as vite from 'vite' |
6 | 7 | import type { isExternal } from 'externality' |
7 | 8 | import { genDynamicImport, genObjectFromRawEntries } from 'knitwork' |
8 | | -import fse from 'fs-extra' |
9 | 9 | import { debounce } from 'perfect-debounce' |
10 | 10 | import { isIgnored, logger } from '@nuxt/kit' |
11 | 11 | import { hashId, isCSS, uniq } from './utils' |
@@ -236,7 +236,7 @@ export async function initViteDevBundler (ctx: ViteBuildContext, onBuild: () => |
236 | 236 | const _doBuild = async () => { |
237 | 237 | const start = Date.now() |
238 | 238 | const { code, ids } = await bundleRequest(options, ctx.entry) |
239 | | - await fse.writeFile(resolve(ctx.nuxt.options.buildDir, 'dist/server/server.mjs'), code, 'utf-8') |
| 239 | + await writeFile(resolve(ctx.nuxt.options.buildDir, 'dist/server/server.mjs'), code, 'utf-8') |
240 | 240 | // Have CSS in the manifest to prevent FOUC on dev SSR |
241 | 241 | const manifestIds: string[] = [] |
242 | 242 | for (const i of ids) { |
|
0 commit comments