fix: revert back to runtime app for hmr (#153)

This commit is contained in:
Daniel Roe
2023-05-04 17:18:36 +01:00
committed by GitHub
parent 9ce43ac68b
commit 97b1a85ea1
2 changed files with 5 additions and 8 deletions

View File

@@ -1,11 +1,11 @@
import { defineNuxtModule, installModule, addComponentsDir, addImportsDir, createResolver, addPlugin } from '@nuxt/kit'
import { defineNuxtModule, installModule, addComponentsDir, addImportsDir, createResolver, addPlugin, resolvePath } from '@nuxt/kit'
import colors from 'tailwindcss/colors.js'
import { iconsPlugin, getIconCollections } from '@egoist/tailwindcss-icons'
import { defu } from 'defu'
import { name, version } from '../package.json'
import { colorsAsRegex, excludeColors } from './runtime/utils/colors'
import appConfig from './runtime/app.config'
import type { DeepPartial } from './runtime/types'
type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> | { [key: string]: string } }>
// @ts-ignore
delete colors.lightBlue
@@ -65,10 +65,9 @@ export default defineNuxtModule<ModuleOptions>({
nuxt.options.css.push(resolve(runtimeDir, 'ui.css'))
nuxt.options.appConfig.ui = defu(nuxt.options.appConfig.ui, appConfig.ui)
const appConfigFile = await resolvePath(resolve(runtimeDir, 'app.config'))
nuxt.hook('app:resolve', (app) => {
app.configs.push(resolve(runtimeDir, 'app.config'))
app.configs.push(appConfigFile)
})
// @ts-ignore

View File

@@ -3,5 +3,3 @@ export * from './clipboard'
export * from './command-palette'
export * from './popper'
export * from './toast'
export type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> | { [key: string]: string } }>