Skip to content

Conversation

keuller
Copy link

@keuller keuller commented Jan 27, 2025

What's changed?

  • Add support for import components dynamically
  • Map those async components via Route component
  • Updated the README.md file to fix svelte5-router references instead of svelte-routing
  • Updated the test application to demonstrate async route component

This PR addresses an important feature for dynamic imports, which allow us to split the app bundle in chunks.

<script lang="ts">
    import { dynamic, Router, Route } from "svete5-router";

   const AboutRoute = dynamic(import("./routes/About.svelte"));
</script>

<Router>
    <Route path="/about" component={AboutRoute} />
</Router>

Keuller Magalhaes added 6 commits January 27, 2025 08:58
    **What's changed?**

    - Add support for import components dynamically
    - Map those async components via Route component

    This PR addresses an important feature for dynamic imports, which allow us to split the app bundle in chunks.
@lmaccherone
Copy link

I suggest that you add .svelte-kit and dist to the .gitignore file.

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.

2 participants