@kitschpatrol/tweakpane-plugin-thumbnail-list
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@kitschpatrol/tweakpane-plugin-thumbnail-list

Overview

This is a fork of tweakpane-plugin-thumbnail-list with Tweakpane 4.0 compatibility and externalized dependencies.

It's under consideration for inclusion in the svelte-tweakpane-ui project, but may be useful to others who wish to use the plugin with Tweakpane 4.0.

Please refer to the upstream project for documentation and other details.

Background

The Rollup configuration provided in the Tweakpane plugin template does not externalize @tweakpane/core as a production dependency.

Instead, it gets built into the single-file plugin artifact, which is what's published to NPM and imported by plugin consumers. This makes it easy to import as an ES module from a URL, but means that larger projects importing multiple Tweakpane plugins end up with duplicate copies of the @tweakpane/core code, adding about ~100 Kb to the final minified build for each plugin after the first.

Externalizing this dependency allows build tools like vite to share a single instance of the @tweakpane/core code across multiple plugins.

If you're not using a bundler, direct ESM imports from URLs can still work if needed by defining the @tweakpane/core dependency in an importmap.

Implementation notes

A PR on the upstream project with Tweakpane 4.0 support is pending.

Note the package's name change from tweakpane-plugin-thumbnail-list to @kitschpatrol/tweakpane-plugin-thumbnail-list.

PNPM is used as the package manager.

Package Sidebar

Install

npm i @kitschpatrol/tweakpane-plugin-thumbnail-list

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

36 kB

Total Files

16

Last publish

Collaborators

  • kitschpatrol