Content: issue with vuetify in md files

Created on 2 Jul 2020  路  2Comments  路  Source: nuxt/content

Version

@nuxt/content: 1.4.1
nuxt: 2.13.2
devDependancies
@nuxtjs/vuetify:

Steps to reproduce

  • add vuetify to your project
  • add components from vuetify in md files

What is Expected?

I expected that the component, like my custom component works in production.

What is actually happening?

In dev mode, vuetify components are transform to html but in production mode, vuetify components are not transform.

md file
image

production
image

development
image

bug

Most helpful comment

You have to explicitly import your vuetify components into your component.

the vuetify Loader trys to get the component while compiling but doesn't check the .md files.

Your Options:

  1. Disable Vuetify Treeshaking
  2. import used Vuetify-Components (only when they are used in .md files)

All 2 comments

You have to explicitly import your vuetify components into your component.

the vuetify Loader trys to get the component while compiling but doesn't check the .md files.

Your Options:

  1. Disable Vuetify Treeshaking
  2. import used Vuetify-Components (only when they are used in .md files)

ok, nice to know it ! In fact, I doesn't think about theeshaking, which is enable by default in production (docs of @nuxt/vuetify)
image

After importing components, it works, thanks.

import { VRow, VCol } from 'vuetify/lib/components/VGrid'

export default {
  components: {
    VRow,
    VCol,
  },
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ctwhome picture ctwhome  路  4Comments

thely picture thely  路  4Comments

uporot1k picture uporot1k  路  4Comments

dolbex picture dolbex  路  3Comments

jonathanmach picture jonathanmach  路  4Comments