meteor-svelte

Build cybernetically enhanced web apps with Meteor and Svelte.

  • 所有者: meteor-svelte/meteor-svelte
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Svelte for Meteor

Build cybernetically enhanced web apps with Meteor and Svelte.

Installation

To use meteor-svelte, run the following commands:

$ meteor add svelte:compiler
$ meteor npm install svelte@<version>

Important: The version of the svelte npm package should match the version of svelte:compiler.

Options

Compiler options can be specified with a "svelte:compiler" property in package.json. For example:

{
  ...
  "svelte:compiler": {
    "extensions": ["svelte", "html"],
    "hydratable": true,
    "css": false
  }
}

extensions (default: ["svelte"])

An array of file extensions to be recognized by the package.
Note that HTML files are not compiled with the Svelte compiler if they contain top-level <head> or <body> elements.
Instead, the contents of the elements are added to the respective sections in the HTML output generated by Meteor (similar to what the static-html package does).

hydratable (default: false)

By default, Svelte removes server-rendered static HTML when the application is loaded on the client and replaces it with a client-rendered version.
If you want to reuse (hydrate) server-rendered HTML, set the hydratable option to true (which generates additional code for client components) and use the hydrate option when instantiating your root component.

css (default: true)

Svelte can extract styles for server-side rendering.
If you want to render CSS on the server, you might want to set the css option to false so that client-rendered components don't insert CSS into the DOM.

Server-Side Rendering

meteor-svelte supports server-side rendering with minimal configuration.
If you import Svelte components on the server, they are automatically built for server-side rendering.
See the Svelte API docs, the example app, and the hydratable and css options above for more details.

Examples

主要指标

概览
名称与所有者meteor-svelte/meteor-svelte
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2016-12-03 14:21:32
推送于2022-02-22 15:21:17
最后一次提交2022-02-22 16:16:22
发布数5
最新版本名称v3.46.2 (发布于 2022-01-23 14:22:14)
第一版名称v3.27.0 (发布于 2020-10-05 12:25:19)
用户参与
星数114
关注者数7
派生数12
提交数87
已启用问题?
问题数33
打开的问题数7
拉请求数8
打开的拉请求数3
关闭的拉请求数9
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?