1.1.8 — fix clean-install crash for real: bundle @getflywheel/local-components
1.1.7's fix (consume react-router-dom via context.ReactRouter) was real but
incomplete — the SAME class of bug remained for @getflywheel/local-components.
Once react-router-dom was removed, local-components became the first
unresolvable require, so clean installs still crashed identically.
Root cause confirmed by reproducing a real .tgz install and reading Local's
log (local-lightning.log):
Error Loading Add-on: .../local-addon-kinsta/lib/renderer/index.js
Error: Cannot find module '@getflywheel/local-components'
Local exposes only react + react-dom to an add-on's renderer require() path; it
does NOT expose @getflywheel/local-components. We externalized it but never
shipped it (only axios is bundled), so require() threw MODULE_NOT_FOUND at load,
the add-on never registered its hooks (no UI), and Local's shell crashed with
"Cannot read properties of undefined (reading 'toString')". The dev machine
never hit it because the installed add-on is a symlink to the repo (full
node_modules).
Fix: stop externalizing @getflywheel/local-components so webpack bundles it
(react/react-dom stay external for Local's single React instance). The built
renderer bundle now requires only react, react-dom, electron, and Node builtins.
bundle.packaging.test.ts corrected: its "Local-provided" allowlist wrongly
included @getflywheel/local-components (which is why 1.1.7 passed it); it now
reflects the verified set (react/react-dom + Node builtins + bundledDependencies)
and allows Node core modules.
Verified live: installed the packaged .tgz into Local (not the symlink),
confirmed via log "Successfully Loaded Add-on" and via CDP that the Kinsta Sync
page renders with no error dialog.
Full Changelog: v1.1.7...v1.1.8