Skip to content

Releases: 11ty/eleventy-plugin-webc

Eleventy WebC v0.11.2

16 Dec 20:28
Compare
Choose a tag to compare

Milestone: https://github.com/11ty/eleventy-plugin-webc/milestone/12?closed=1
Full Changelog: v0.11.1...v0.11.2

  • Fix for Eleventy import to allow this plugin to be compatible with both ESM and CJS projects in Eleventy v3.0. #91

Eleventy WebC v0.11.1

16 Dec 20:31
Compare
Choose a tag to compare

Milestone: https://github.com/11ty/eleventy-plugin-webc/milestone/11?closed=1
Full Changelog: v0.11.0...v0.11.1

Eleventy WebC v0.11.0

31 Mar 15:11
Compare
Choose a tag to compare

Milestone: https://github.com/11ty/eleventy-plugin-webc/milestone/10?closed=1
Full Changelog: v0.10.1...v0.11.0

WebC v0.11.0

⚠️ BREAKING ⚠️ This will affect your component code if you relied on global data from inside of component definitions.

Child components will now need to access global data through a top level $data variable instead of as top level variables. This is important to prevent global data leaking into component data and affecting component logic.

This will not affect pages or top-level WebC components (in Eleventy world, these are *.webc files as Eleventy layouts or in as pages in your input folder). This only affects child components (in Eleventy world, this means files in your components folder, e.g. _components/**/*.webc).

Sorry to have to make this breaking change, but it’s an important one.

Other fixes in this release:

  • Fix for webc:scoped with @keyframes and percentages. 11ty/webc#145
  • Fix bug with webc:setup feeding Arrays into webc:for 11ty/webc#150

Eleventy WebC v0.10.0: Declarative Loops and Flow Control

24 Mar 22:31
Compare
Choose a tag to compare

Upgrades to WebC v0.10.0: more context on the full WebC Release Notes

  • webc:for for looping https://www.11ty.dev/docs/languages/webc/#webcfor-loops
  • webc:elseif and webc:else https://www.11ty.dev/docs/languages/webc/#webcelseif-and-webcelse
  • Server-only HTML comments <!--- One more dash at the start and end ---> https://www.11ty.dev/docs/languages/webc/#server-only-comments
  • <script webc:type="js"> (via implied webc:is="template") will be treated as HTML-only components and not use the host component tags (via implied webc:nokeep).
  • Relax circular dependency errors: instead of throwing an error, we now treat this as a plain HTML tag instead of a WebC component. This makes it easier to override HTML tags (e.g. img.webc returning an <img> without needing using webc:root="override").
  • ⚠️ BREAKING (but low-impact): void elements (self-closing elements without a closing tag) used as components will be ignored in output when the component has child content. (e.g. img.webc returning an <img> without needing to use webc:root="override")

Full Changelog: v0.9.4...v0.10.0

Eleventy WebC v0.9.4: 65% Faster

15 Mar 21:49
Compare
Choose a tag to compare

What's Changed

  • Using WebC v0.9.3 Release Notes
    • 65% faster!!
    • Added a WebC component cache
    • Shamefully large performance wins via changes to Node vm.createContext

A special thanks to @marvinhagemeister’s Node profiling recommendation!

How fast is it?

From a large sample WebC project:

Before, using WebC v0.9.2:
> Wrote 2621 files in 21.17 seconds (8.1ms each, v2.0.0)

After, using WebC v0.9.3:
> Wrote 2621 files in 7.24 seconds (2.8ms each, v2.0.0)

From 8.1ms per template to 2.8ms per template!

Full Changelog: v0.9.3...v0.9.4

Eleventy WebC v0.9.3: Bundle plugin options

03 Mar 01:19
Compare
Choose a tag to compare

Full Changelog: v0.9.2...v0.9.3

Eleventy WebC v0.9.2: Asset Bucketing, Anywhere

02 Mar 23:28
Compare
Choose a tag to compare
  • Adds support for an Array (of files or globs) to be passed in via the components option.
  • Adds support for npm: prefixes in components option.

For example:

eleventyConfig.addPlugin(pluginWebc, {
	components: [
		"./_components/**/*.webc",
		"npm:@11ty/is-land/*.webc",
		"npm:@11ty/eleventy-plugin-syntaxhighlight/*.webc",
	],
});

Full Changelog: v0.9.1...v0.9.2

Using WebC v0.9.1

WebC v0.9.1 release notes:

  • Adds support for webc:bucket on any tag and it will cascade to all child content (with automatic hoisting when necessary) 11ty/webc#122
  • Adds support for webc:bucket to be dynamic (e.g. :webc:bucket="myJavaScriptData") 11ty/webc#120
  • Adds support for globs when passing an Array to WebC.getComponentsMap() 11ty/webc#123
  • Adds npm: aliasing support to WebC.getComponentsMap() 11ty/webc#123

Eleventy WebC v0.9.1: Asset bucketing fix

27 Feb 15:59
Compare
Choose a tag to compare
  • Fix CSS and JS not getting bundled for non-default buckets by @Gyanreyer in #57 #56

Milestone: https://github.com/11ty/eleventy-plugin-webc/milestone/8?closed=1
Full Changelog: v0.9.0...v0.9.1

Eleventy WebC v0.9.0: `<script webc:setup>` and `@attributes`

23 Feb 17:46
Compare
Choose a tag to compare

Eleventy WebC v0.8.0: Little Bundler of Joy

05 Dec 19:16
Compare
Choose a tag to compare

Breaking Changes

  • Enables Bundler mode consistently for all WebC files (notably, this was not enabled for Eleventy Layout files previously). Read more at #33 and #11.
    • ACTION NEEDED 🚨 You will need to add webc:keep to any <style> or <script> tags in Eleventy Layout WebC files to prevent them from being re-bundled out of existence! (You can check out an example of a WebC file as an Eleventy Layout on the WebC docs)
    • This was important as it allows the use of WebC components in Eleventy Layout files and will bundle their assets as expected. Read more about WebC Bundler Mode
  • From WebC v0.8.0: attribute-name properties and attributes are now available in data as camel-case: attribute-name in JS data is attributeName. Read more at @11ty/webc#71

WebC release notes:

Milestone: https://github.com/11ty/eleventy-plugin-webc/milestone/6?closed=1
Full Changelog: v0.7.0...v0.8.0