-
Notifications
You must be signed in to change notification settings - Fork 904
How to use in vue.js #578
Comments
Take a look at this #476 In your main.js require your theme. You don't have to use sunburst.
In your component then just require it.
In your component mounted
|
@Pyronerd62 I am trying to use this in Vue but not working:
and I get this error TypeError: code_prettify__WEBPACK_IMPORTED_MODULE_2___default.a.prettyPrint is not a function If I |
@PrimozRome You can use import. It doesn't have the proper exports. However it will work in you require it. Use this.
Don't forget to require a css theme in your main.js like:
If this isn't working show me your code in your main js and component file. Also make sure you're using the master branch. The current branch on npm doesn't contain the exports for require. No branch contain the proper exports to import it. |
Oh @PrimozRome you have to require it as prettyPrint since it's exported as such. Take a look here:
If you use any other constant variable it won't work either. |
I want to ask how to join vue,thank
The text was updated successfully, but these errors were encountered: