In episode 1 of the Meteor & Svelte series you’ve learnt how to install Meteor on your development system and create a first meteor project.

In this episode we’re going to install Svelte in the Meteor project and go through a first simple Meteor/Svelte sample application.

Installing Svelte In Meteor

In order to be able to use Svelte within you Meteor project we need to install further dependencies. First of all we’re we need to add the NPM package svelte by using the following command:

$ meteor npm install --save svelte

Furthermore we need to make sure to also add two more Meteor packages. This is done by using the meteor add command:

$ meteor add svelte:compiler rdb:svelte-meteor-data

Next let’s remove the blaze-html-templates Meteor package as we’ll not be using the Blaze templating system in our application:

$ meteor remove blaze-html-templates

To make sure that HTML files are processes add the_ static-html_ Meteor package. It simply turns <head> and <body> fragments found in .html files into raw HTML that will be served from the Meteor web server:

$ meteor add static-html

Now the Meteor project is prepared and we’re ready to make use of Svelte for implementing the client part of our project.

#meteor #svelte #full-stack #web-development

Building Full-Stack Reactive Web Applications – 02: Working With Svelte In Meteor
3.00 GEEK