Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Vue plugin into separate file #424

Merged
merged 3 commits into from
May 24, 2021
Merged

Move Vue plugin into separate file #424

merged 3 commits into from
May 24, 2021

Conversation

bakerkretzmar
Copy link
Collaborator

This PR moves the Vue plugin added in #407 into it's own file and builds it separately from the main package. It adds new microbundle scripts to build these files because microbundle doesn't yet support multiple entry and output files.

This does basically duplicate the whole package, since all of Ziggy's core is included in the new bundle too, but that shouldn't matter since users of the Vue plugin will only import that module, not the main route one.

Using the Vue plugin would now look like this:

import { ZiggyVue } from 'ziggy-js/dist/vue';

Closes #422, but in v2.0 we will probably stop using default exports in favour of all exports being named, which will allow this:

import { ZiggyVue } from 'ziggy-js';

@bakerkretzmar bakerkretzmar requested a review from jakebathman May 14, 2021 15:05
@bakerkretzmar bakerkretzmar self-assigned this May 14, 2021
@bakerkretzmar bakerkretzmar merged commit 63ec730 into main May 24, 2021
@bakerkretzmar bakerkretzmar deleted the jbk/named-exports branch May 24, 2021 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default and named exports
1 participant