Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Vuetify treeshaking #364

Merged
merged 3 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 193 additions & 1 deletion package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"sinon": "^9.2.4",
"sinon-chai": "^3.5.0",
"vue-cli-plugin-vuetify": "~2.5.8",
"vue-template-compiler": "2.7.14"
"vue-template-compiler": "2.7.14",
"vuetify-loader": "^1.9.2"
},
"engines": {
"node": ">= 16.19.0",
Expand Down
3 changes: 1 addition & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in vue.config.js with runtimeCompiler.
import Vue from 'vue';
import Vuetify from 'vuetify';
import Vuetify from 'vuetify/lib/framework';
sronveaux marked this conversation as resolved.
Show resolved Hide resolved
import PortalVue from 'portal-vue'
import VueI18n from 'vue-i18n';
import 'roboto-fontface/css/roboto/roboto-fontface.css'
Expand All @@ -13,7 +13,6 @@ import UrlUtil from './util/Url';
import LocaleUtil from './util/Locale';
import ObjectUtil from './util/Object';
import ColorThemeUtil from './util/ColorTheme'
import 'vuetify/dist/vuetify.min.css';
import axios from 'axios';

Vue.use(Vuetify);
Expand Down
2 changes: 2 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ module.exports = defineConfig({
// Tweak configuration options for Karma test runner to produce a bundle
// which can run under Chrome headless. Avoid warnings due to custom entries
// and customized filenames. Enable correct code coverage of .vue files.
// Disable Vuetify treeshaking.
if (process.env.NODE_ENV === 'test') {
config.devtool = 'eval'
config.optimization.runtimeChunk = false
config.optimization.splitChunks = false
config.plugins = config.plugins.filter(plugin => plugin.constructor.name !== 'VuetifyLoaderPlugin')
sronveaux marked this conversation as resolved.
Show resolved Hide resolved
delete config.target
delete config.entry
delete config.output.filename
Expand Down
Loading