refactor: flatten composables and enable auto-imports on dirs (#608)
This commit is contained in:
parent
d569754b09
commit
aeb5a40948
14 changed files with 17 additions and 26 deletions
|
@ -1,9 +1,10 @@
|
|||
import { fileURLToPath } from 'node:url'
|
||||
import { createResolver } from '@nuxt/kit'
|
||||
import Inspect from 'vite-plugin-inspect'
|
||||
import { isCI, isDevelopment } from 'std-env'
|
||||
import { i18n } from './config/i18n'
|
||||
import { pwa } from './config/pwa'
|
||||
|
||||
const { resolve } = createResolver(import.meta.url)
|
||||
const isPreview = process.env.PULL_REQUEST === 'true' || process.env.CONTEXT === 'deploy-preview' || process.env.CONTEXT === 'dev'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
|
@ -44,6 +45,12 @@ export default defineNuxtConfig({
|
|||
'change-case': 'scule',
|
||||
'semver': 'unenv/runtime/mock/empty',
|
||||
},
|
||||
imports: {
|
||||
dirs: [
|
||||
'./composables/push-notifications',
|
||||
'./composables/tiptap',
|
||||
],
|
||||
},
|
||||
vite: {
|
||||
define: {
|
||||
'process.env.VSCODE_TEXTMATE_DEBUG': 'false',
|
||||
|
@ -100,7 +107,7 @@ export default defineNuxtConfig({
|
|||
},
|
||||
nitro: {
|
||||
publicAssets: [
|
||||
...(!isCI || isPreview ? [{ dir: fileURLToPath(new URL('./public-dev', import.meta.url)) }] : []),
|
||||
...(!isCI || isPreview ? [{ dir: resolve('./public-dev') }] : []),
|
||||
],
|
||||
prerender: {
|
||||
crawlLinks: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue