-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with vuetify in md files #221
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:
|
@mathe42 @Barbapapazes can you describe more detailed about your "second way" about importing components directly? In my case used component. So: <script>
// I'm importing VAlert component
import VAlert from 'vuetify/lib/components/VAlert'
// I'm adding it to components of vue page and disable eslint for this line just to try
components: {
// eslint-disable-next-line vue/no-unused-components
VAlert
},
</script> What have I to do next?
Or there's no "two ways" and import of components that I need is working with disabled treeshaking only? |
I think your code should work... 🤔 but you can import the component directly from vuetify/lib but that should be the same |
@mathe42 how can I correctly disable treeshaking? (Just to try if it will help me)
Sorry for so stupid question, but what do you mean here? |
should work.
|
I guess I need also @mathe42 Thank you :) Also you said before
Does this mean that bug related to Vuetify itself(vuetify-loader)? Also does this global component adding affect other pages? Or it's scoped for the page where I added it? I'm not a native english speaker too, so I'm not sure how to describe my question more correctly :c |
No. vuetify-loader runs at build but md files arey parsed at runtime so there is no way to implement that. Adding VAlert is no problem and doesn't effect other components. (In 99.9%) |
Finaly I have import Vue from 'vue'
import { VAlert } from 'vuetify/lib'
Vue.component('VAlert', VAlert) And problem solved for But is there any way to make this part of code runs only when |
Version
@nuxt/content: 1.4.1
nuxt: 2.13.2
devDependancies
@nuxtjs/vuetify:
Steps to reproduce
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](https://user-images.githubusercontent.com/45267552/86403602-51be9f80-bcae-11ea-90fd-7c966a070b21.png)
production
![image](https://user-images.githubusercontent.com/45267552/86403573-44a1b080-bcae-11ea-89c7-446783caef23.png)
development
![image](https://user-images.githubusercontent.com/45267552/86403673-7286f500-bcae-11ea-991b-cd5388826640.png)
The text was updated successfully, but these errors were encountered: