Description
This means instead of using require('module-name')
we use import myModule from 'my-module'
And instead of module.exports = {}
we use export const something = function
etc.
Read more about modules here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
Reasoning for ES6 modules and a migration guide: https://blog.sindresorhus.com/hello-modules-d1010b4e777b
In addition to that I want to export the various parts seperately:
Instead of exporting the single object with the install function that both registers the mixin and the catch-async-error component I want to export them seperately as named exports https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#default_exports_versus_named_exports
Call them catchError, asyncMixin and asyncPlugin so that it can be imported this way:
import { asyncMixin, asyncPlugin, catchError } from 'vue-async-methods'
No default export is needed.