Skip to content

Commit

Permalink
docs: update tree-shake option (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
beijaflor committed Jan 17, 2021
1 parent d4e6687 commit e587be0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Expand Up @@ -189,12 +189,21 @@ export default function ({ app }) {

### `treeShake`

- Type: `Boolean`
- Type: `Object` or `Boolean`
- Default: `process.env.NODE_ENV === 'production'`

Uses [vuetify-loader](https://github.com/vuetifyjs/vuetify-loader) to enable automatic [tree-shaking](https://vuetifyjs.com/en/customization/a-la-carte).
Enabled only for production by default.

You can set object as a set of options to [manually import](https://vuetifyjs.com/en/features/treeshaking/#manually-importing) Vuetify modules globally:

| Key | Type | Value |
| --- | --- | --- |
| components | string[] | array of name of Vuetify components to import globally |
| directives | string[] | array of name of Vuetify directives to import globally |
| loaderOptions | function | loader option which applies to VuetifyLoaderPlugin |
| transitions | string[] | array of name of [Vuetify transitions](https://vuetifyjs.com/en/styles/transitions/) to import globally |

## TypeScript

If you're using TypeScript, you'll need to add `@nuxtjs/vuetify` in your `compilerOptions` of your `tsconfig.json` :
Expand Down

0 comments on commit e587be0

Please sign in to comment.