Skip to content

Commit

Permalink
Add vuetify treeshaking
Browse files Browse the repository at this point in the history
Resultant javascript chunk is now smaller 🎉
  • Loading branch information
sbs20 committed Nov 10, 2023
1 parent 91ad135 commit baeed98
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 5 deletions.
1 change: 1 addition & 0 deletions app-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@intlify/unplugin-vue-i18n": "1.5.0",
"@mdi/js": "7.3.67",
"@vitejs/plugin-vue": "4.4.1",
"vite-plugin-vuetify": "1.0.2",
"vue": "3.3.8",
"vue-advanced-cropper": "2.8.8",
"vue-i18n": "9.6.5",
Expand Down
4 changes: 0 additions & 4 deletions app-ui/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { createRouter, createWebHashHistory } from 'vue-router';
import { createI18n, useI18n } from 'vue-i18n';
import { createVuetify } from 'vuetify';
import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n';
import * as components from 'vuetify/components';
import * as directives from 'vuetify/directives';
import messages from '@intlify/unplugin-vue-i18n/messages';
import { aliases, mdi } from 'vuetify/iconsets/mdi-svg';
import '@/styles/main.scss';
Expand Down Expand Up @@ -34,7 +32,6 @@ const i18n = createI18n({
});

const vuetify = createVuetify({
components,
defaults: {
VBtn: {
variant: 'tonal',
Expand All @@ -46,7 +43,6 @@ const vuetify = createVuetify({
variant: 'plain',
}
},
directives,
icons: {
defaultSet: 'mdi',
aliases,
Expand Down
2 changes: 2 additions & 0 deletions app-ui/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from "vite";
import vue from '@vitejs/plugin-vue'
import vuetify from 'vite-plugin-vuetify'
import path from "path";
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import packageJson from './package.json'
Expand All @@ -14,6 +15,7 @@ export default defineConfig({
},
plugins: [
vue(),
vuetify(),
VueI18nPlugin({
include: [path.resolve(__dirname, './src/locales/**')],
compositionOnly: false
Expand Down
151 changes: 150 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit baeed98

Please sign in to comment.