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

0.3.1-beta.2 • Public • Published

@kitschpatrol/tweakpane-plugin-camerakit

NPM Package @kitschpatrol/tweakpane-plugin-camerakit

Overview

This is a fork of Hiroki Kokubun's @tweakpane/plugin-camerakit with externalized dependencies.

This allows for smaller bundled file sizes in projects using multiple Tweakpane plugins.

It is published to NPM primarily for the Svelte Tweakpane UI project, and will be kept in sync with the upstream version of the plugin, with minimal changes other than dependency externalization.

For most use cases, you probably don't want this fork!

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

Note the package name change from @tweakpane/plugin-camerakit to @kitschpatrol/tweakpane-plugin-camerakit.

PNPM is used as the package manager.

Versioning

In addition to the dependency externalization change, this plugin fork also includes assorted dependency updates. In an effort to stay in sync with future upstream versions, intra-minor-version releases of the fork are tagged as "beta" of the next upstream version is released, at which point a version-matching release may be made.

Example sequence:

  1. 2023-08-10 Upstream release: 0.3.0
  2. 2023-05-15 Fork release matching upstream: 0.3.0
  3. 2024-09-15 Fork release with dependency updates: 0.3.1-beta.1
  4. Hypothetical 2024-11-22 Fork release with dependency updates: 0.3.1-beta.2
  5. Hypothetical 2024-12-24 Upstream release: 0.3.1
  6. Hypothetical 2024-12-24 Fork release matching upstream: 0.3.1
  7. Hypothetical 2025-01-24 Fork release with dependency updates: 0.3.2-beta.1

Package Sidebar

Install

npm i @kitschpatrol/tweakpane-plugin-camerakit

Weekly Downloads

559

Version

0.3.1-beta.2

License

MIT

Unpacked Size

38.9 kB

Total Files

13

Last publish

Collaborators

  • kitschpatrol