Overview
The Meteor Svelte Starter is a starter project for Svelte on Meteor, created by Kevin Newman at NP Dev LLC. It provides a configuration for integrating Svelte with Meteor and includes features such as code splitting, routing, server-side rendering (SSR), data loading using Meteor’s tracker, and fast-rendering to prevent loading flashes.
Features
- Svelte Integration: Uses svelte:compiler for seamless integration of Svelte with Meteor.
- Code Splitting: Achieves perfect code splitting with Meteor’s dynamic-imports through npdev:svelte-loadable.
- Routing: Implements routing using svelte-routing to navigate between different pages.
- Server-Side Rendering (SSR): Utilizes Meteor’s server-render for SSR, with properly configured code split preloading through npdev:svelte-loadable.
- SSR Hydration: Implements SSR hydration, with optimized route-specific module preloading, using npdev:svelte-loadable.
- Data Loading: Demonstrates how to load data using Meteor’s tracker, ensuring efficient data retrieval.
- Fast Rendering: Integrates staringatlights:fast-render to hydrate pub/sub data before rendering, preventing a flash of loading.
Installation
To install the Meteor Svelte Starter, follow these steps:
- Clone the repository.
- Navigate to the project folder on your local machine.
- Install the necessary Meteor packages by running the following command:
- Start the development server by running:
- Access the project in your browser at
http://localhost:3000.
Summary
The Meteor Svelte Starter is a starter project that combines the power of Svelte and Meteor. It provides seamless integration between Svelte and Meteor, allowing developers to leverage the features of both frameworks. The project includes key features such as code splitting, routing, and server-side rendering, making it a comprehensive starter kit for building web applications with Svelte and Meteor.