Skip to content

A fork of tweakpane-plugin-thumbnail-list with Tweakpane 4 compatibility and externalized dependencies.

License

Notifications You must be signed in to change notification settings

kitschpatrol/tweakpane-plugin-thumbnail-list

 
 

Repository files navigation

@kitschpatrol/tweakpane-plugin-thumbnail-list

NPM Package @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.

Versioning

The upstream project is currently zero-versioned. I've proposed version 1.0.0 in the pull-request with Tweakpane 4.0 support. Since a merge doesn't seem imminent, updates to the fork will follow normal semver practices instead of remaining in sync with hypothetical future updates to the upstream project. I might revisit this if the upstream repo springs back to life.

About

A fork of tweakpane-plugin-thumbnail-list with Tweakpane 4 compatibility and externalized dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 46.2%
  • JavaScript 26.4%
  • SCSS 16.3%
  • HTML 11.1%