I have a hard time packaging our components as an npm package so we can reuse them in other projects. I have the feeling I searched everywhere on the internet to no avail. I'm suspecting that using our components in the class syntax style makes most, if not even all, examples fail for me. The final and most successful so far was the one from the Vue documentation However with that one I get an error:
[!] (buble plugin) SyntaxError: Unexpected character '@'
The reason for that is obviously the class syntax with @Component immediately failing the build. Is there a way to make this work with class syntax?
My component's script part looks like this (nothing special on the css and template parts):
<script>
import { Vue, Component, Prop } from 'vue-property-decorator';
@Component
export default class Checkbox extends Vue {
@Prop({default: false}) checked;
};
</script>