You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a proof of concept with TypeScript and vue-class-component and have an issue with <style module> not working.
Basically the computed $styles property never ends up on the exported definition. This only happens when the component has no other computed properties defined. If you add a placeholder it will work:
get$style(){return{};}
I believe this is just the nature of the beast with the way annotations work. Since the options are wrapped in a closure, if you don't have a reference to the computed object in there from the start then the logic in vue-loader that defines computed[$style] puts it in the wrong place.
I'm not sure that there is a way to fix it (other than the workaround mentioned) but I figured I would put this up for discussion. I made an update to vue-class-component to define a computed object if one is not provided which works, but seems like an edge case that doesn't belong in that lib...
The text was updated successfully, but these errors were encountered:
I'm working on a proof of concept with TypeScript and vue-class-component and have an issue with
<style module>
not working.Basically the computed
$styles
property never ends up on the exported definition. This only happens when the component has no other computed properties defined. If you add a placeholder it will work:I believe this is just the nature of the beast with the way annotations work. Since the options are wrapped in a closure, if you don't have a reference to the computed object in there from the start then the logic in vue-loader that defines
computed[$style]
puts it in the wrong place.I'm not sure that there is a way to fix it (other than the workaround mentioned) but I figured I would put this up for discussion. I made an update to vue-class-component to define a computed object if one is not provided which works, but seems like an edge case that doesn't belong in that lib...
The text was updated successfully, but these errors were encountered: