Open NEK-RA opened 3 years ago
Question created on Stackoverflow - https://stackoverflow.com/questions/66473779/
Problem solved by wrapping v-alert component in my own version with it's basic props, thanks to answer on StackOverflow
At least it feels more valid than previous way, so I hope that's finally solved. Issue will stay opened for those who can approve/disapprove this solution as valid
Problem
WARNING: next commented code is REQUIRED for static generation for Vuetify components rendered inside markdown files
Related issues:
As I understand: Vuetify loader doesn't check content of markdown files, that's why while runnin
nuxt generate
Vuetify components (that may be used in any component without import) are not rendered while used inside markdown files. I.e. v-alert which was used in blog to mark some text as warning and etc. Atnuxt dev
mode Vuetify component are rendered correctly because treeshake is disabled for development modeThis problem solved by two ways:
Finaly second way works for
nuxt generate
and static content is renedered correctly, but if this code is used while usingnuxt dev
, development server will return error about "Unexpected token 'export'" when I visit page that displays markdown with Vuetify components.P.S.: currently I used only "v-alert" component from Vuetify. If any more components will be used, don't forget to add them here!
Status
Searching the way to avoid always comment/uncomment code for static generation