-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(preview): Vuetify 3 + Vite preset
feat(preview): Vuetify 3 + Vite preset
- Loading branch information
Showing
12 changed files
with
180 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/vue-cli-plugin-vuetify/generator/templates/v3/src/index.vite.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vuetify 3 Vite Preview</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
|
||
</html> |
25 changes: 18 additions & 7 deletions
25
packages/vue-cli-plugin-vuetify/generator/templates/v3/src/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { createApp } from "vue"; | ||
import vuetify from "./plugins/vuetify"; | ||
import App from "./App"; | ||
import { createApp } from 'vue' | ||
import vuetify from './plugins/vuetify' | ||
import App from './App.vue' | ||
<%_ if (router) { _%> | ||
import router from './router' | ||
<%_ } _%> | ||
<%_ if (store) { _%> | ||
import store from './store' | ||
<%_ } _%> | ||
|
||
const app = createApp(App); | ||
const app = createApp(App) | ||
<%_ if (router) { _%> | ||
app.use(router) | ||
<%_ } _%> | ||
<%_ if (store) { _%> | ||
app.use(store) | ||
<%_ } _%> | ||
app.use(vuetify) | ||
|
||
app.use(vuetify); | ||
|
||
app.mount("#app"); | ||
app.mount('#app') |
12 changes: 6 additions & 6 deletions
12
packages/vue-cli-plugin-vuetify/generator/templates/v3/src/plugins/vuetify.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import "@mdi/font/css/materialdesignicons.css"; | ||
import "vuetify/lib/styles/main.sass"; | ||
import { createVuetify } from "vuetify"; | ||
import * as components from "vuetify/lib/components"; | ||
import * as directives from "vuetify/lib/directives"; | ||
import '@mdi/font/css/materialdesignicons.css' | ||
import 'vuetify/lib/styles/main.sass' | ||
import { createVuetify } from 'vuetify' | ||
import * as components from 'vuetify/lib/components' | ||
import * as directives from 'vuetify/lib/directives' | ||
|
||
export default createVuetify({ | ||
components, | ||
directives, | ||
}); | ||
}) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/vue-cli-plugin-vuetify/generator/templates/v3/src/vite.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
define: { 'process.env': {} }, | ||
/* remove the need to specify .vue files https://vitejs.dev/config/#resolve-extensions | ||
resolve: { | ||
extensions: [ | ||
'.js', | ||
'.json', | ||
'.jsx', | ||
'.mjs', | ||
'.ts', | ||
'.tsx', | ||
'.vue', | ||
] | ||
}, | ||
*/ | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"useConfigFiles": true, | ||
"cssPreprocessor": "scss", | ||
"plugins": { | ||
"vue-cli-plugin-vuetify": { | ||
"preset": "configure", | ||
"replaceComponents": true, | ||
"iconFont": "mdi", | ||
"installFonts": true, | ||
"locale": "en", | ||
"useAlaCarte": true, | ||
"useCustomProperties": false, | ||
"usePolyfill": false, | ||
"useTheme": false, | ||
"useV3": true, | ||
"useVite": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters