mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
fix: revert back to runtime app for hmr (#153)
This commit is contained in:
@@ -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
|
||||
|
||||
2
src/runtime/types/index.d.ts
vendored
2
src/runtime/types/index.d.ts
vendored
@@ -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 } }>
|
||||
|
||||
Reference in New Issue
Block a user