Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

webpack-plugin-vuetify

vuetifyjs65.3kMIT3.1.1TypeScript support: included

A Webpack plugin for treeshaking Vuetify components and more

readme

webpack-plugin-vuetify

Automatic Imports

webpack-plugin-vuetify will automatically import all Vuetify components as you use them

// webpack.config.js
const { VuetifyPlugin } = require('webpack-plugin-vuetify')

module.exports = {
  plugins: [
    new VuetifyPlugin({ autoImport: true }), // Enabled by default
  ],
}
// plugins/vuetify.js
import 'vuetify/styles'
import { createVuetify } from 'vuetify'

export default createVuetify()
<template>
  <v-card>
    ...
  </v-card>
</template>

<script>
  export default {
    ...
  }
</script>

Will be compiled into:

<template>
  <v-card>
    ...
  </v-card>
</template>

<script>
  import { VCard } from 'vuetify/components'

  export default {
    components: {
      VCard,
    },
    ...
  }
</script>

Style loading

Customising variables

// webpack.config.js
const { VuetifyPlugin } = require('webpack-plugin-vuetify')

module.exports = {
  plugins: [
    new VuetifyPlugin({ styles: { configFile: 'src/settings.scss' } }),
  ],
}
// plugins/vuetify.js
import 'vuetify/styles'
import { createVuetify } from 'vuetify'

export default createVuetify()
// settings.scss
@forward 'vuetify/settings' with (
  $color-pack: false,
  $utilities: false,
);

settings.scss can be used in your own components to access vuetify's variables.

Remove all style imports

// webpack.config.js
const { VuetifyPlugin } = require('webpack-plugin-vuetify')

module.exports = {
  plugins: [
    new VuetifyPlugin({ styles: 'none' }),
  ],
}
// plugins/vuetify.js
import { createVuetify } from 'vuetify'

export default createVuetify()

Import sass from source

Vuetify 3 uses precompiled css by default, these imports can optionally be modified to point to sass files instead:

// webpack.config.js
const { VuetifyPlugin } = require('webpack-plugin-vuetify')

module.exports = {
  plugins: [
    new VuetifyPlugin({ styles: 'sass' }),
  ],
}

Progressive images

Coming soon...

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

3.1.1 (2025-04-03)

Bug Fixes

  • styles: resolve new scss component styles (#345) (98ef110)

3.1.0 (2025-02-04)

Note: Version bump only for package webpack-plugin-vuetify

3.0.3 (2024-03-10)

Note: Version bump only for package webpack-plugin-vuetify

3.0.2 (2024-02-28)

Bug Fixes

3.0.1 (2023-12-12)

Bug Fixes

3.0.0 (2023-12-12)

⚠ BREAKING CHANGES

  • Requires node >18
  • Removed styles: 'expose' option

Features

Bug Fixes

  • add explicit vue peer dependency (6634db3), closes #292

2.0.1 (2023-01-28)

Bug Fixes

  • add leading slash to absolute paths on windows (3ecd8e2), closes #274

2.0.0 (2022-10-13)

Features

2.0.0-alpha.13 (2022-08-31)

Features

2.0.0-alpha.12 (2022-07-23)

Bug Fixes

  • add vue and upath to dependencies (ac5af82), closes #242
  • resolve vuetify relative to cwd (9bf71d4), closes #248

2.0.0-alpha.11 (2022-06-16)

Features

2.0.0-alpha.10 (2022-05-21)

Features

2.0.0-alpha.9 (2021-12-10)

Features

  • add stylesTimeout option (93e830d)

Bug Fixes

  • wait for all other modules to resolve before writing styles (274ce9c), closes #225

2.0.0-alpha.8 (2021-11-17)

Note: Version bump only for package vuetify-loader

2.0.0-alpha.7 (2021-11-15)

Bug Fixes

  • collect imports from script setup in prod build (7d9b26e)

2.0.0-alpha.6 (2021-11-11)

Features

Bug Fixes

2.0.0-alpha.5 (2021-10-03)

Bug Fixes

2.0.0-alpha.4 (2021-09-17)

Bug Fixes

  • use find-cache-dir, normalise dos paths (990ee15), closes #202

2.0.0-alpha.3 (2021-09-11)

Features

  • implement styles options (f0cb894)

Bug Fixes

  • support components with no template (033040b), closes #199

2.0.0-alpha.2 (2021-08-31)

Bug Fixes

  • add loader-shared to dependencies (f420076)

2.0.0-alpha.1 (2021-08-30)

Features

  • implement autoImport plugin (163ff7f)