Skip to content

Add link, router, route, navaid-hash to index.js exports #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add link, router, route, navaid-hash to index.js exports #2

wants to merge 1 commit into from

Conversation

nafkhanzam
Copy link

So instead of importing like this:

<script>
  import Router from 'svelte-navaid/Router.svelte';
  import Route from 'svelte-navaid/Route.svelte';
  import Link from 'svelte-navaid/Link.svelte';
  import navaidHash from 'svelte-navaid/navaid-hash';
</script>

We can import it like this:

<script>
  import { Router, Route, Link, navaidHash } from "svelte-navaid";
</script>

Copy link

@teckhan teckhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of "require(...)", do "require(...).default"

@jacwright
Copy link
Owner

This would require bundling the components into a packaged JavaScript file. This way they are bundled with your app, use your app's shared svelte code, and stay up-to-date with the latest Svelte release without needing this project to rebuild and re-release with each version of Svelte.

Thoughts?

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.

3 participants