Skip to content

Convert to ES6 module over common js and split up package #16

Open
@mokkabonna

Description

@mokkabonna

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions