create-vuetify 2.2.5 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/index.mjs +713 -84
  2. package/package.json +7 -3
  3. package/template/javascript/base/eslint.config.js +23 -0
  4. package/template/javascript/base/package.json +7 -10
  5. package/template/javascript/base/src/router/index.js +21 -0
  6. package/template/javascript/base/vite.config.mjs +7 -0
  7. package/template/javascript/default/index.html +10 -13
  8. package/template/javascript/default/package.json +10 -7
  9. package/template/javascript/default/src/components/AppFooter.vue +2 -2
  10. package/template/javascript/default/vite.config.mjs +7 -0
  11. package/template/javascript/essentials/_eslintrc-auto-import.json +72 -0
  12. package/template/javascript/essentials/package.json +1 -1
  13. package/template/javascript/essentials/src/router/index.js +21 -1
  14. package/template/javascript/essentials/vite.config.mjs +7 -0
  15. package/template/typescript/base/env.d.ts +2 -0
  16. package/template/typescript/base/eslint.config.js +36 -0
  17. package/template/typescript/base/package.json +8 -12
  18. package/template/typescript/base/src/router/index.ts +21 -0
  19. package/template/typescript/base/vite.config.mts +7 -0
  20. package/template/typescript/default/_editorconfig +4 -3
  21. package/template/typescript/default/env.d.ts +1 -0
  22. package/template/typescript/default/index.html +7 -10
  23. package/template/typescript/default/package.json +21 -13
  24. package/template/typescript/default/tsconfig.app.json +14 -0
  25. package/template/typescript/default/tsconfig.json +8 -28
  26. package/template/typescript/default/tsconfig.node.json +14 -4
  27. package/template/typescript/default/vite.config.mts +7 -0
  28. package/template/typescript/essentials/_eslintrc-auto-import.json +69 -0
  29. package/template/typescript/essentials/env.d.ts +3 -0
  30. package/template/typescript/essentials/package.json +1 -1
  31. package/template/typescript/essentials/src/components/AppFooter.vue +2 -2
  32. package/template/typescript/essentials/src/router/index.ts +21 -1
  33. package/template/typescript/essentials/vite.config.mts +7 -0
  34. package/template/typescript/nuxt/app-layout.vue +5 -0
  35. package/template/typescript/nuxt/app.vue +9 -0
  36. package/template/typescript/nuxt/components/AppFooter.vue +79 -0
  37. package/template/typescript/nuxt/components/HelloWorld.vue +153 -0
  38. package/template/typescript/nuxt/layouts/default.vue +9 -0
  39. package/template/typescript/nuxt/modules/vuetify.ts +125 -0
  40. package/template/typescript/nuxt/pages/index.vue +8 -0
  41. package/template/typescript/nuxt/plugins/vuetify-nuxt.ts +8 -0
  42. package/template/typescript/nuxt/plugins/vuetify.ts +14 -0
  43. package/template/typescript/nuxt/vuetify.config.ts +8 -0
  44. package/dist/output.cjs +0 -264
  45. package/template/javascript/base/_eslintrc.js +0 -10
  46. package/template/typescript/base/_eslintrc.js +0 -20
  47. package/template/typescript/base/tsconfig.json +0 -32
  48. package/template/typescript/default/src/vite-env.d.ts +0 -7
  49. package/template/typescript/essentials/tsconfig.json +0 -33
@@ -0,0 +1,69 @@
1
+ {
2
+ "globals": {
3
+ "Component": true,
4
+ "ComponentPublicInstance": true,
5
+ "ComputedRef": true,
6
+ "EffectScope": true,
7
+ "ExtractDefaultPropTypes": true,
8
+ "ExtractPropTypes": true,
9
+ "ExtractPublicPropTypes": true,
10
+ "InjectionKey": true,
11
+ "PropType": true,
12
+ "Ref": true,
13
+ "VNode": true,
14
+ "WritableComputedRef": true,
15
+ "computed": true,
16
+ "createApp": true,
17
+ "customRef": true,
18
+ "defineAsyncComponent": true,
19
+ "defineComponent": true,
20
+ "effectScope": true,
21
+ "getCurrentInstance": true,
22
+ "getCurrentScope": true,
23
+ "h": true,
24
+ "inject": true,
25
+ "isProxy": true,
26
+ "isReactive": true,
27
+ "isReadonly": true,
28
+ "isRef": true,
29
+ "markRaw": true,
30
+ "nextTick": true,
31
+ "onActivated": true,
32
+ "onBeforeMount": true,
33
+ "onBeforeUnmount": true,
34
+ "onBeforeUpdate": true,
35
+ "onDeactivated": true,
36
+ "onErrorCaptured": true,
37
+ "onMounted": true,
38
+ "onRenderTracked": true,
39
+ "onRenderTriggered": true,
40
+ "onScopeDispose": true,
41
+ "onServerPrefetch": true,
42
+ "onUnmounted": true,
43
+ "onUpdated": true,
44
+ "provide": true,
45
+ "reactive": true,
46
+ "readonly": true,
47
+ "ref": true,
48
+ "resolveComponent": true,
49
+ "shallowReactive": true,
50
+ "shallowReadonly": true,
51
+ "shallowRef": true,
52
+ "toRaw": true,
53
+ "toRef": true,
54
+ "toRefs": true,
55
+ "toValue": true,
56
+ "triggerRef": true,
57
+ "unref": true,
58
+ "useAttrs": true,
59
+ "useCssModule": true,
60
+ "useCssVars": true,
61
+ "useRoute": true,
62
+ "useRouter": true,
63
+ "useSlots": true,
64
+ "watch": true,
65
+ "watchEffect": true,
66
+ "watchPostEffect": true,
67
+ "watchSyncEffect": true
68
+ }
69
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="unplugin-vue-router/client" />
3
+ /// <reference types="vite-plugin-vue-layouts/client" />
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "devDependencies": {
3
3
  "pinia" : "^2.1.7",
4
- "unplugin-auto-import": "^0.17.5",
4
+ "unplugin-auto-import": "^0.17.6",
5
5
  "vite-plugin-vue-layouts": "^0.11.0"
6
6
  }
7
7
  }
@@ -47,7 +47,7 @@
47
47
  },
48
48
  {
49
49
  title: 'Vuetify X',
50
- icon: `svg:M2.04875 3.00002L9.77052 13.3248L1.99998 21.7192H3.74882L10.5519 14.3697L16.0486 21.7192H22L13.8437 10.8137L21.0765 3.00002H19.3277L13.0624 9.76874L8.0001 3.00002H2.04875ZM4.62054 4.28821H7.35461L19.4278 20.4308H16.6937L4.62054 4.28821Z`,
50
+ icon: ['M2.04875 3.00002L9.77052 13.3248L1.99998 21.7192H3.74882L10.5519 14.3697L16.0486 21.7192H22L13.8437 10.8137L21.0765 3.00002H19.3277L13.0624 9.76874L8.0001 3.00002H2.04875ZM4.62054 4.28821H7.35461L19.4278 20.4308H16.6937L4.62054 4.28821Z'],
51
51
  href: 'https://x.com/vuetifyjs',
52
52
  },
53
53
  {
@@ -57,7 +57,7 @@
57
57
  },
58
58
  {
59
59
  title: 'Vuetify Discord',
60
- icon: `mdi-discord`,
60
+ icon: ['M22,24L16.75,19L17.38,21H4.5A2.5,2.5 0 0,1 2,18.5V3.5A2.5,2.5 0 0,1 4.5,1H19.5A2.5,2.5 0 0,1 22,3.5V24M12,6.8C9.32,6.8 7.44,7.95 7.44,7.95C8.47,7.03 10.27,6.5 10.27,6.5L10.1,6.33C8.41,6.36 6.88,7.53 6.88,7.53C5.16,11.12 5.27,14.22 5.27,14.22C6.67,16.03 8.75,15.9 8.75,15.9L9.46,15C8.21,14.73 7.42,13.62 7.42,13.62C7.42,13.62 9.3,14.9 12,14.9C14.7,14.9 16.58,13.62 16.58,13.62C16.58,13.62 15.79,14.73 14.54,15L15.25,15.9C15.25,15.9 17.33,16.03 18.73,14.22C18.73,14.22 18.84,11.12 17.12,7.53C17.12,7.53 15.59,6.36 13.9,6.33L13.73,6.5C13.73,6.5 15.53,7.03 16.56,7.95C16.56,7.95 14.68,6.8 12,6.8M9.93,10.59C10.58,10.59 11.11,11.16 11.1,11.86C11.1,12.55 10.58,13.13 9.93,13.13C9.29,13.13 8.77,12.55 8.77,11.86C8.77,11.16 9.28,10.59 9.93,10.59M14.1,10.59C14.75,10.59 15.27,11.16 15.27,11.86C15.27,12.55 14.75,13.13 14.1,13.13C13.46,13.13 12.94,12.55 12.94,11.86C12.94,11.16 13.45,10.59 14.1,10.59Z'],
61
61
  href: 'https://community.vuetifyjs.com/',
62
62
  },
63
63
  {
@@ -7,10 +7,30 @@
7
7
  // Composables
8
8
  import { createRouter, createWebHistory } from 'vue-router/auto'
9
9
  import { setupLayouts } from 'virtual:generated-layouts'
10
+ import { routes } from 'vue-router/auto-routes'
10
11
 
11
12
  const router = createRouter({
12
13
  history: createWebHistory(import.meta.env.BASE_URL),
13
- extendRoutes: setupLayouts,
14
+ routes: setupLayouts(routes),
15
+ })
16
+
17
+ // Workaround for https://github.com/vitejs/vite/issues/11804
18
+ router.onError((err, to) => {
19
+ if (err?.message?.includes?.('Failed to fetch dynamically imported module')) {
20
+ if (!localStorage.getItem('vuetify:dynamic-reload')) {
21
+ console.log('Reloading page to fix dynamic import error')
22
+ localStorage.setItem('vuetify:dynamic-reload', 'true')
23
+ location.assign(to.fullPath)
24
+ } else {
25
+ console.error('Dynamic import error, reloading page did not fix it', err)
26
+ }
27
+ } else {
28
+ console.error(err)
29
+ }
30
+ })
31
+
32
+ router.isReady().then(() => {
33
+ localStorage.removeItem('vuetify:dynamic-reload')
14
34
  })
15
35
 
16
36
  export default router
@@ -71,4 +71,11 @@ export default defineConfig({
71
71
  server: {
72
72
  port: 3000,
73
73
  },
74
+ css: {
75
+ preprocessorOptions: {
76
+ sass: {
77
+ api: 'modern-compiler',
78
+ },
79
+ },
80
+ },
74
81
  })
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <NuxtLayout>
3
+ <NuxtPage />
4
+ </NuxtLayout>
5
+ </template>
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <v-app>
3
+ <v-main>
4
+ <NuxtPage />
5
+ </v-main>
6
+
7
+ <AppFooter />
8
+ </v-app>
9
+ </template>
@@ -0,0 +1,79 @@
1
+ <script setup lang="ts">
2
+ const items = shallowRef([
3
+ {
4
+ title: 'Vuetify Documentation',
5
+ icon: `$vuetify`,
6
+ href: 'https://vuetifyjs.com/',
7
+ },
8
+ {
9
+ title: 'Vuetify Support',
10
+ icon: 'mdi-shield-star-outline',
11
+ href: 'https://support.vuetifyjs.com/',
12
+ },
13
+ {
14
+ title: 'Vuetify X',
15
+ icon: ['M2.04875 3.00002L9.77052 13.3248L1.99998 21.7192H3.74882L10.5519 14.3697L16.0486 21.7192H22L13.8437 10.8137L21.0765 3.00002H19.3277L13.0624 9.76874L8.0001 3.00002H2.04875ZM4.62054 4.28821H7.35461L19.4278 20.4308H16.6937L4.62054 4.28821Z'],
16
+ href: 'https://x.com/vuetifyjs',
17
+ },
18
+ {
19
+ title: 'Vuetify GitHub',
20
+ icon: `mdi-github`,
21
+ href: 'https://github.com/vuetifyjs/vuetify',
22
+ },
23
+ {
24
+ title: 'Vuetify Discord',
25
+ icon: ['M22,24L16.75,19L17.38,21H4.5A2.5,2.5 0 0,1 2,18.5V3.5A2.5,2.5 0 0,1 4.5,1H19.5A2.5,2.5 0 0,1 22,3.5V24M12,6.8C9.32,6.8 7.44,7.95 7.44,7.95C8.47,7.03 10.27,6.5 10.27,6.5L10.1,6.33C8.41,6.36 6.88,7.53 6.88,7.53C5.16,11.12 5.27,14.22 5.27,14.22C6.67,16.03 8.75,15.9 8.75,15.9L9.46,15C8.21,14.73 7.42,13.62 7.42,13.62C7.42,13.62 9.3,14.9 12,14.9C14.7,14.9 16.58,13.62 16.58,13.62C16.58,13.62 15.79,14.73 14.54,15L15.25,15.9C15.25,15.9 17.33,16.03 18.73,14.22C18.73,14.22 18.84,11.12 17.12,7.53C17.12,7.53 15.59,6.36 13.9,6.33L13.73,6.5C13.73,6.5 15.53,7.03 16.56,7.95C16.56,7.95 14.68,6.8 12,6.8M9.93,10.59C10.58,10.59 11.11,11.16 11.1,11.86C11.1,12.55 10.58,13.13 9.93,13.13C9.29,13.13 8.77,12.55 8.77,11.86C8.77,11.16 9.28,10.59 9.93,10.59M14.1,10.59C14.75,10.59 15.27,11.16 15.27,11.86C15.27,12.55 14.75,13.13 14.1,13.13C13.46,13.13 12.94,12.55 12.94,11.86C12.94,11.16 13.45,10.59 14.1,10.59Z'],
26
+ href: 'https://community.vuetifyjs.com/',
27
+ },
28
+ {
29
+ title: 'Vuetify Reddit',
30
+ icon: `mdi-reddit`,
31
+ href: 'https://reddit.com/r/vuetifyjs',
32
+ },
33
+ ])
34
+ </script>
35
+
36
+ <template>
37
+ <v-footer height="40" app>
38
+ <NuxtLink
39
+ v-for="item in items"
40
+ :key="item.title"
41
+ :href="item.href"
42
+ :title="item.title"
43
+ class="d-inline-block mx-2 social-link"
44
+ rel="noopener noreferrer"
45
+ target="_blank"
46
+ >
47
+ <v-icon
48
+ :icon="item.icon"
49
+ :size="item.icon === '$vuetify' ? 24 : 16"
50
+ />
51
+ </NuxtLink>
52
+
53
+ <div
54
+ class="text-caption text-disabled"
55
+ style="position: absolute; right: 16px;"
56
+ >
57
+ &copy; 2016-{{ (new Date()).getFullYear() }} <span class="d-none d-sm-inline-block">Vuetify, LLC</span>
58
+
59
+ <NuxtLink
60
+ class="text-decoration-none on-surface"
61
+ href="https://vuetifyjs.com/about/licensing/"
62
+ rel="noopener noreferrer"
63
+ target="_blank"
64
+ >
65
+ MIT License
66
+ </NuxtLink>
67
+ </div>
68
+ </v-footer>
69
+ </template>
70
+
71
+ <style scoped lang="sass">
72
+ .social-link :deep(.v-icon)
73
+ color: rgba(var(--v-theme-on-background), var(--v-disabled-opacity))
74
+ text-decoration: none
75
+ transition: .2s ease-in-out
76
+
77
+ &:hover
78
+ color: rgba(25, 118, 210, 1)
79
+ </style>
@@ -0,0 +1,153 @@
1
+ <template>
2
+ <v-container class="fill-height">
3
+ <v-responsive
4
+ class="align-centerfill-height mx-auto"
5
+ max-width="900"
6
+ >
7
+ <v-img
8
+ class="mb-4"
9
+ height="150"
10
+ src="~/assets/logo.png"
11
+ />
12
+
13
+ <div class="text-center">
14
+ <div class="text-body-2 font-weight-light mb-n1">Welcome to</div>
15
+
16
+ <h1 class="text-h2 font-weight-bold">Vuetify</h1>
17
+ </div>
18
+
19
+ <div class="py-4" />
20
+
21
+ <v-row>
22
+ <v-col cols="12">
23
+ <v-card
24
+ class="py-4"
25
+ color="surface-variant"
26
+ image="https://cdn.vuetifyjs.com/docs/images/one/create/feature.png"
27
+ prepend-icon="mdi-rocket-launch-outline"
28
+ rounded="lg"
29
+ variant="outlined"
30
+ >
31
+ <template #image>
32
+ <v-img position="top right" />
33
+ </template>
34
+
35
+ <template #title>
36
+ <h2 class="text-h5 font-weight-bold">Get started</h2>
37
+ </template>
38
+
39
+ <template #subtitle>
40
+ <div class="text-subtitle-1">
41
+ Change this page by updating <v-kbd>{{ `<HelloWorld />` }}</v-kbd> in <v-kbd>components/HelloWorld.vue</v-kbd>.
42
+ </div>
43
+ </template>
44
+
45
+ <v-overlay
46
+ opacity=".12"
47
+ scrim="primary"
48
+ contained
49
+ model-value
50
+ persistent
51
+ />
52
+ </v-card>
53
+ </v-col>
54
+
55
+ <v-col cols="6">
56
+ <v-card
57
+ append-icon="mdi-open-in-new"
58
+ class="py-4"
59
+ color="surface-variant"
60
+ href="https://vuetifyjs.com/"
61
+ prepend-icon="mdi-text-box-outline"
62
+ rel="noopener noreferrer"
63
+ rounded="lg"
64
+ subtitle="Learn about all things Vuetify in our documentation."
65
+ target="_blank"
66
+ title="Documentation"
67
+ variant="text"
68
+ >
69
+ <v-overlay
70
+ opacity=".06"
71
+ scrim="primary"
72
+ contained
73
+ model-value
74
+ persistent
75
+ />
76
+ </v-card>
77
+ </v-col>
78
+
79
+ <v-col cols="6">
80
+ <v-card
81
+ append-icon="mdi-open-in-new"
82
+ class="py-4"
83
+ color="surface-variant"
84
+ href="https://vuetifyjs.com/introduction/why-vuetify/#feature-guides"
85
+ prepend-icon="mdi-star-circle-outline"
86
+ rel="noopener noreferrer"
87
+ rounded="lg"
88
+ subtitle="Explore available framework Features."
89
+ target="_blank"
90
+ title="Features"
91
+ variant="text"
92
+ >
93
+ <v-overlay
94
+ opacity=".06"
95
+ scrim="primary"
96
+ contained
97
+ model-value
98
+ persistent
99
+ />
100
+ </v-card>
101
+ </v-col>
102
+
103
+ <v-col cols="6">
104
+ <v-card
105
+ append-icon="mdi-open-in-new"
106
+ class="py-4"
107
+ color="surface-variant"
108
+ href="https://vuetifyjs.com/components/all"
109
+ prepend-icon="mdi-widgets-outline"
110
+ rel="noopener noreferrer"
111
+ rounded="lg"
112
+ subtitle="Discover components in the API Explorer."
113
+ target="_blank"
114
+ title="Components"
115
+ variant="text"
116
+ >
117
+ <v-overlay
118
+ opacity=".06"
119
+ scrim="primary"
120
+ contained
121
+ model-value
122
+ persistent
123
+ />
124
+ </v-card>
125
+ </v-col>
126
+
127
+ <v-col cols="6">
128
+ <v-card
129
+ append-icon="mdi-open-in-new"
130
+ class="py-4"
131
+ color="surface-variant"
132
+ href="https://discord.vuetifyjs.com"
133
+ prepend-icon="mdi-account-group-outline"
134
+ rel="noopener noreferrer"
135
+ rounded="lg"
136
+ subtitle="Connect with Vuetify developers."
137
+ target="_blank"
138
+ title="Community"
139
+ variant="text"
140
+ >
141
+ <v-overlay
142
+ opacity=".06"
143
+ scrim="primary"
144
+ contained
145
+ model-value
146
+ persistent
147
+ />
148
+ </v-card>
149
+ </v-col>
150
+ </v-row>
151
+ </v-responsive>
152
+ </v-container>
153
+ </template>
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <v-app>
3
+ <v-main>
4
+ <slot />
5
+ </v-main>
6
+
7
+ <AppFooter />
8
+ </v-app>
9
+ </template>
@@ -0,0 +1,125 @@
1
+ import { defineNuxtModule } from '@nuxt/kit'
2
+ import type { Options as ModuleOptions } from '@vuetify/loader-shared'
3
+ import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
4
+ import path from 'upath'
5
+ import { resolveVuetifyBase, isObject } from '@vuetify/loader-shared'
6
+ import { pathToFileURL } from 'node:url'
7
+
8
+ export type { ModuleOptions }
9
+
10
+ // WARNING: Remove the file from modules directory if you install vuetify-nuxt-module
11
+ export default defineNuxtModule<ModuleOptions>({
12
+ meta: {
13
+ name: 'vuetify-module',
14
+ configKey: 'vuetify',
15
+ },
16
+ defaults: () => ({ styles: true }),
17
+ setup(options, nuxt) {
18
+ let configFile: string | undefined
19
+ const vuetifyBase = resolveVuetifyBase()
20
+ const noneFiles = new Set<string>()
21
+ let isNone = false
22
+ let sassVariables = false
23
+ const PREFIX = 'vuetify-styles/'
24
+ const SSR_PREFIX = `/@${PREFIX}`
25
+
26
+ nuxt.hook('vite:extendConfig', (viteInlineConfig) => {
27
+ // add vuetify transformAssetUrls
28
+ viteInlineConfig.vue ??= {}
29
+ viteInlineConfig.vue.template ??= {}
30
+ viteInlineConfig.vue.template.transformAssetUrls = transformAssetUrls
31
+
32
+ viteInlineConfig.plugins = viteInlineConfig.plugins ?? []
33
+ viteInlineConfig.plugins.push(vuetify({
34
+ autoImport: options.autoImport,
35
+ styles: true,
36
+ }))
37
+
38
+ viteInlineConfig.css ??= {}
39
+ viteInlineConfig.css.preprocessorOptions ??= {}
40
+ viteInlineConfig.css.preprocessorOptions.sass ??= {}
41
+ viteInlineConfig.css.preprocessorOptions.sass.api = 'modern-compiler'
42
+
43
+ viteInlineConfig.plugins.push({
44
+ name: 'vuetify:nuxt:styles',
45
+ enforce: 'pre',
46
+ async configResolved (config) {
47
+ if (isObject(options.styles)) {
48
+ sassVariables = true
49
+ if (path.isAbsolute(options.styles.configFile)) {
50
+ configFile = path.resolve(options.styles.configFile)
51
+ } else {
52
+ configFile = path.resolve(path.join(config.root || process.cwd(), options.styles.configFile))
53
+ }
54
+ configFile = pathToFileURL(configFile).href
55
+ }
56
+ else {
57
+ isNone = options.styles === 'none'
58
+ }
59
+ },
60
+ async resolveId (source, importer, { custom, ssr }) {
61
+ if (source.startsWith(PREFIX) || source.startsWith(SSR_PREFIX)) {
62
+ if (source.endsWith('.sass')) {
63
+ return source
64
+ }
65
+
66
+ const idx = source.indexOf('?')
67
+ return idx > -1 ? source.slice(0, idx) : source
68
+ }
69
+ if (
70
+ source === 'vuetify/styles' || (
71
+ importer &&
72
+ source.endsWith('.css') &&
73
+ isSubdir(vuetifyBase, path.isAbsolute(source) ? source : importer)
74
+ )
75
+ ) {
76
+ if (options.styles === 'sass') {
77
+ const target = source.replace(/\.css$/, '.sass')
78
+ return this.resolve(target, importer, { skipSelf: true, custom })
79
+ }
80
+
81
+ const resolution = await this.resolve(source, importer, { skipSelf: true, custom })
82
+
83
+ if (!resolution)
84
+ return undefined
85
+
86
+ const target = resolution.id.replace(/\.css$/, '.sass')
87
+ if (isNone) {
88
+ noneFiles.add(target)
89
+ return target
90
+ }
91
+
92
+ return `${ssr ? SSR_PREFIX: PREFIX}${path.relative(vuetifyBase, target)}`
93
+ }
94
+
95
+ return undefined
96
+ },
97
+ load(id){
98
+ if (sassVariables) {
99
+ const target = id.startsWith(PREFIX)
100
+ ? path.resolve(vuetifyBase, id.slice(PREFIX.length))
101
+ : id.startsWith(SSR_PREFIX)
102
+ ? path.resolve(vuetifyBase, id.slice(SSR_PREFIX.length))
103
+ : undefined
104
+
105
+ if (target) {
106
+ return {
107
+ code: `@use "${configFile}"\n@use "${pathToFileURL(target).href}"`,
108
+ map: {
109
+ mappings: '',
110
+ },
111
+ }
112
+ }
113
+ }
114
+
115
+ return isNone && noneFiles.has(id) ? '' : undefined
116
+ },
117
+ })
118
+ })
119
+ }
120
+ })
121
+
122
+ function isSubdir (root: string, test: string) {
123
+ const relative = path.relative(root, test)
124
+ return relative && !relative.startsWith('..') && !path.isAbsolute(relative)
125
+ }
@@ -0,0 +1,8 @@
1
+ <script lang="ts" setup>
2
+ //
3
+ </script>
4
+
5
+ <template>
6
+ <HelloWorld />
7
+ </template>
8
+
@@ -0,0 +1,8 @@
1
+ export default defineNuxtPlugin((nuxtApp) => {
2
+ // check https://vuetify-nuxt-module.netlify.app/guide/nuxt-runtime-hooks.html
3
+ nuxtApp.hook('vuetify:before-create', (options) => {
4
+ if (import.meta.client) {
5
+ console.log('vuetify:before-create', options)
6
+ }
7
+ })
8
+ })
@@ -0,0 +1,14 @@
1
+ import { createVuetify } from 'vuetify'
2
+
3
+ export default defineNuxtPlugin((nuxtApp) => {
4
+ const vuetify = createVuetify({
5
+ // WARNING: when switching ssr option in nuxt.config.ts file you need to manually change it here
6
+ ssr: true,
7
+ // your Vuetify options here
8
+ theme: {
9
+ defaultTheme: 'dark',
10
+ },
11
+ })
12
+
13
+ nuxtApp.vueApp.use(vuetify);
14
+ })
@@ -0,0 +1,8 @@
1
+ import { defineVuetifyConfiguration } from 'vuetify-nuxt-module/custom-configuration'
2
+
3
+ export default defineVuetifyConfiguration({
4
+ // your Vuetify options here
5
+ theme: {
6
+ defaultTheme: 'dark',
7
+ },
8
+ })