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

1.0.3 • Public • Published

@kitschpatrol/tweakpane-plugin-waveform

NPM Package @kitschpatrol/tweakpane-plugin-waveform

Overview

This is a fork of Simon Schödler's tweakpane-plugin-waveform 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's name change from tweakpane-plugin-waveform to @kitschpatrol/tweakpane-plugin-waveform.

PNPM is used as the package manager.

Readme

Keywords

none

Package Sidebar

Install

npm i @kitschpatrol/tweakpane-plugin-waveform

Weekly Downloads

73

Version

1.0.3

License

MIT

Unpacked Size

20.2 kB

Total Files

10

Last publish

Collaborators

  • kitschpatrol