Skip to content

Commit

Permalink
Fixed treeshaking ignored. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
logue committed Nov 1, 2022
1 parent a8ae0ee commit 88ad081
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/package.json",
"name": "vite-vuetify-ts-starter",
"description": "Vue3 Vuetify TypeScript Startar project for Vite.",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",
"type": "module",
"private": true,
Expand Down Expand Up @@ -51,7 +51,7 @@
},
"devDependencies": {
"@types/jsdom": "^20.0.0",
"@types/node": "^18.11.8",
"@types/node": "^18.11.9",
"@types/webfontloader": "^1.6.35",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/__tests__/HelloWorld.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect } from 'vitest';
import { describe, expect, it } from 'vitest';
import { mount } from '@vue/test-utils';
import vuetify, { components } from '@/plugins/vuetify';

Expand Down
9 changes: 4 additions & 5 deletions src/plugins/vuetify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
*/
import { aliases, mdi } from 'vuetify/iconsets/mdi';
import { createVuetify } from 'vuetify';

// For test use. Do not include createVuetify()
// see https://next.vuetifyjs.com/en/features/treeshaking/
import * as components from 'vuetify/components';
import * as directives from 'vuetify/directives';

Expand Down Expand Up @@ -51,11 +54,7 @@ export default createVuetify({
theme: {
defaultTheme: 'light',
},
// Tree shaking. Do not change bellow line.
// https://next.vuetifyjs.com/en/getting-started/installation/
components,
directives,
});

// For Test use
// Export for test.
export { components, directives };
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,10 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^18.11.8":
version: 18.11.8
resolution: "@types/node@npm:18.11.8"
checksum: 60b358f97c1a029722dc785811b217615ef20249c3fbde60a65869cfd7a5cd5b1872ee95c79c187ef70e5a078f4ac7670d2129803985268b1f021ad6e8040af8
"@types/node@npm:^18.11.9":
version: 18.11.9
resolution: "@types/node@npm:18.11.9"
checksum: cc0aae109e9b7adefc32eecb838d6fad931663bb06484b5e9cbbbf74865c721b03d16fd8d74ad90e31dbe093d956a7c2c306ba5429ba0c00f3f7505103d7a496
languageName: node
linkType: hard

Expand Down Expand Up @@ -6539,7 +6539,7 @@ __metadata:
dependencies:
"@mdi/font": ^7.0.96
"@types/jsdom": ^20.0.0
"@types/node": ^18.11.8
"@types/node": ^18.11.9
"@types/webfontloader": ^1.6.35
"@typescript-eslint/eslint-plugin": ^5.42.0
"@typescript-eslint/parser": ^5.42.0
Expand Down

0 comments on commit 88ad081

Please sign in to comment.