From 265ad65ecb4ea3a1a4ae8761627f2d9acd75592d Mon Sep 17 00:00:00 2001 From: Frank Spee Date: Wed, 10 Jan 2024 21:26:25 +0100 Subject: [PATCH] revert: :rewind: generate files in dist directory if not otherwise configured Reverts the fix from commit https://github.com/nuxt-modules/ionic/commit/2dfd31d9fedb3f088f37e14045aef6d056b6b9a8 --- src/module.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/module.ts b/src/module.ts index dfdaffac..3426e731 100644 --- a/src/module.ts +++ b/src/module.ts @@ -156,22 +156,10 @@ export default defineNuxtModule({ ) if (nuxt.options._generate) { - nuxt.hook('nitro:config', async config => { + nuxt.hook('nitro:config', config => { config.prerender ||= {} config.prerender.routes ||= [] config.prerender.routes.push('/200.html') - - config.output ||= {} - if (!config.output.publicDir) { - const distDir = resolve(nuxt.options.rootDir, 'dist') - const stats = await fsp.lstat(distDir).catch(() => null) - if (!stats || !stats.isSymbolicLink()) { - config.output.publicDir = distDir - if (!existsSync(distDir)) { - await fsp.mkdir(distDir, { recursive: true }) - } - } - } }) // Ensure there is an index.html file present when doing static file generation