If using a build step, you have the option to use the latest JavaScript standards by including something called a "transpiler". You will sometimes see references to a tool called "babel" as that is the most popular transpiler. Babel is able to convert from the very latest JavaScript syntax to a more widely supported, slightly older syntax so that your code can be used with more Browsers.
The export
statement is one of those new standards. module.exports
is the older syntax. Your build step would use Babel to translate one to the other. You have just done it by hand. Well done!
When looking at VueJS components, you might want to look for clues that the authors haven't been lazy (and purely relied on a build step) but that they have engineered their components so that they work in multiple ways. Documentation showing a couple of different ways to use the component will be the most obvious clue but do go and look at the code itself so that you build up an understanding of what good looks like (and bad for that matter). All of the examples I've given in the WIKI (other than those demonstrating the build step itself) should be that kind of module.