Skip to content

is-land v5.0.0-beta.2

Pre-release
Pre-release

Choose a tag to compare

@zachleat zachleat released this 13 Feb 21:06
  • Brotli compressed file size stats: v4.0.0 at 1.61 kB to v5.0.0 at 1.79 kB
  • Very large performance gains when using on:idle, on:media, or on:load conditions.
  • Fixes bugs with complex Nested is-lands
  • Use passive event listeners with on:interaction to improve scrolling performance (fixes Lighthouse warning) #20
  • Breaking Change affects <is-land autoinit>: Removes autoinit attribute and the is-land-autoinit.js file. Switch to use framework initialization types (via Island.addInitType()) instead.
  • Adds import attribute support to core plugin (was previously in is-land-autoinit.js)
  • Register your own framework initialization types using Island.addInitType() and islands must match the appropriate name in the <is-land type> attribute — examples provided for alpine, petite-vue (see below), vue, vue-ssr, preact, preact-ssr, svelte, or svelte-ssr (Web Components and lit are supported out of the box).
    • Notably when using type and import (e.g. <is-land type import>) import attribute targets are not loaded automatically for you:
      • <is-land import="">: import() is performed for you
      • <is-land import="" type="">: you’re responsible for import() in your initialization function.
  • Adds Island.addFallback API to improve control of fallback content. Example provided for Alpine.js islands (Demo) (without separate <template> markup) for easier-to-control progressively-enhanced fallback content.
  • Support renaming on: attribute prefix #16
  • Adds dist/is-land.min.js minimized JS to published code.
  • Clarify framework support instructions by @dave-kennedy in #28
  • Adding SolidJS web component examples #3 by @jake-danton in #24
  • Swaps to use Import Maps on Lit, Svelte, and Solid demos to skip bundling on libraries that use bare specifiers on imports.
  • Adds GitHub to npm release provenance

Sample Island.addInitType usage for petite-vue:

// This code only needs to be added once globally
Island.addInitType("petite-vue", async (node) => {
	// Load the library, mount the target node
	const { createApp } = await import("https://unpkg.com/petite-vue@0.4.1/dist/petite-vue.es.js");
	createApp().mount(node);
});

New Contributors:

Milestone: https://github.com/11ty/is-land/milestone/2?closed=1
Full Changelog: v4.0.0...v5.0.0-beta.2