Gathering detailed insights and metrics for vuetify-loader
Gathering detailed insights and metrics for vuetify-loader
Gathering detailed insights and metrics for vuetify-loader
Gathering detailed insights and metrics for vuetify-loader
📦 Webpack and Vite plugins for treeshaking Vuetify components and more
npm install vuetify-loader
Typescript
Module System
TypeScript (64.27%)
JavaScript (26.92%)
Vue (5.6%)
HTML (1.66%)
SCSS (1.56%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
518 Stars
256 Commits
92 Forks
26 Watchers
3 Branches
38 Contributors
Updated on Jul 11, 2025
Latest Version
1.9.2
Package Id
vuetify-loader@1.9.2
Unpacked Size
38.93 kB
Size
14.10 kB
File Count
45
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
This package is for Vuetify 2 only, for Vuetify 3 see next
vuetify-loader
will automatically import all Vuetify components as you use them
1// webpack.config.js 2 3const { VuetifyLoaderPlugin } = require('vuetify-loader') 4 5exports.plugins.push( 6 new VuetifyLoaderPlugin() 7)
You can also provide a custom match function to import your own project's components too:
1// webpack.config.js
2
3const { VuetifyLoaderPlugin } = require('vuetify-loader')
4
5exports.plugins.push(
6 new VuetifyLoaderPlugin({
7 /**
8 * This function will be called for every tag used in each vue component
9 * It should return an array, the first element will be inserted into the
10 * components array, the second should be a corresponding import
11 *
12 * originalTag - the tag as it was originally used in the template
13 * kebabTag - the tag normalised to kebab-case
14 * camelTag - the tag normalised to PascalCase
15 * path - a relative path to the current .vue file
16 * component - a parsed representation of the current component
17 */
18 match (originalTag, { kebabTag, camelTag, path, component }) {
19 if (kebabTag.startsWith('core-')) {
20 return [camelTag, `import ${camelTag} from '@/components/core/${camelTag.substring(4)}.vue'`]
21 }
22 }
23 })
24)
or if you're using Vue CLI:
1// vue.config.js 2 3module.exports = { 4 chainWebpack: config => { 5 config.plugin('VuetifyLoaderPlugin').tap(args => [{ 6 match (originalTag, { kebabTag, camelTag, path, component }) { 7 if (kebabTag.startsWith('core-')) { 8 return [camelTag, `import ${camelTag} from '@/components/core/${camelTag.substring(4)}.vue'`] 9 } 10 } 11 }]) 12 } 13}
1<template> 2 <core-form> 3 <v-card> 4 ... 5 </v-card> 6 </core-form> 7</template> 8 9<script> 10 export default { 11 ... 12 } 13</script>
Will be compiled into:
1<template> 2 <core-form> 3 <v-card> 4 ... 5 </v-card> 6 </core-form> 7</template> 8 9<script> 10 import { VCard } from 'vuetify/lib' 11 import CoreForm from '@/components/core/Form.vue' 12 13 export default { 14 components: { 15 VCard, 16 CoreForm 17 }, 18 ... 19 } 20</script>
vuetify-loader
can automatically generate low-res placeholders for the v-img
component
NOTE: You must have ImageMagick, GraphicsMagick, or sharp installed for this to work
Add progressiveImages
to the plugin options:
1exports.plugins.push( 2 new VuetifyLoaderPlugin({ 3 progressiveImages: true 4 }) 5) 6 7// vue-cli 8module.exports = { 9 chainWebpack: config => { 10 config.plugin('VuetifyLoaderPlugin').tap(args => [{ 11 progressiveImages: true 12 }]) 13 } 14}
And away you go!
1<v-img src="@/assets/some-image.jpg"></v-img>
NOTE: The src must follow vue-loader's transform rules
progressiveImages
only works on static paths, for use in a loop you have to require
the image yourself:
1<v-img v-for="i in 10" :src="require(`@/images/image-${i}.jpg?vuetify-preload`)" :key="i">
progressiveImages: true
can be replaced with an object for advanced configuration
1new VuetifyLoaderPlugin({
2 progressiveImages: {
3 size: 12, // Use higher-resolution previews
4 sharp: true // Use sharp instead of ImageMagick
5 }
6})
size
Type: Number
Default: 9
The minimum dimensions of the generated preview images in pixels
resourceQuery
Type: RegExp
Default: /vuetify-preload/
Override the resource qury to match v-img URLs
If you only want some images to have placeholders, add ?lazy
to the end of the request:
1<v-img src="@/assets/some-image.jpg?lazy"></v-img>
And modify the regex to match:
1new VuetifyLoaderPlugin({
2 progressiveImages: {
3 resourceQuery: /lazy\?vuetify-preload/
4 }
5})
sharp
Type: Boolean
Default: false
Use sharp instead of GM for environments without ImageMagick. This will result in lower-quality images
graphicsMagick
Type: Boolean
Default: false
Use GraphicsMagic instead of ImageMagick
registerStylesSSR
Type: Boolean
Default: false
Register Vuetify styles in vue-style-loader.
This fixes styles not being loaded when doing SSR (for example when using @nuxtjs/vuetify). As Vuetify imports styles with JS, without this option, they do not get picked up by SSR.
⚠️ This option requires having manualInject
set to true
in vue-style-loader
config.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
63 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More