is-land v5.0.0-beta.2
Pre-release
Pre-release
- Brotli compressed file size stats: v4.0.0 at
1.61 kBto v5.0.0 at1.79 kB - Very large performance gains when using
on:idle,on:media, oron:loadconditions. - Fixes bugs with complex Nested is-lands
- Use passive event listeners with
on:interactionto improve scrolling performance (fixes Lighthouse warning) #20 - Breaking Change affects
<is-land autoinit>: Removesautoinitattribute and theis-land-autoinit.jsfile. Switch to use framework initialization types (viaIsland.addInitType()) instead. - Adds
importattribute support to core plugin (was previously inis-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 foralpine,petite-vue(see below),vue,vue-ssr,preact,preact-ssr,svelte, orsvelte-ssr(Web Components andlitare supported out of the box).- Notably when using
typeandimport(e.g.<is-land type import>)importattribute targets are not loaded automatically for you:<is-land import="">:import()is performed for you<is-land import="" type="">: you’re responsible forimport()in your initialization function.
- Notably when using
- Adds
Island.addFallbackAPI 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.jsminimized 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