Skip to content

v0.1.2 — Default export fix

Choose a tag to compare

@atbeta atbeta released this 25 Jul 02:46
9462f97

Fix (real root cause this time)

v0.1.1 patched paste/drop interception but the actual crash was on plugin load, before any handler ran. The minified bundle was:

module.exports = { PicFastImageUploaderPlugin: class, __esModule: true }

Obsidian 1.x's plugin loader does const cls = require('./main.js').default and then new cls(app) — but there was no default field. new undefined(...) throws TypeError: h is not a constructor (h is the minified variable holding the default slot).

Switched export classexport default class in src/main.ts. Bundle now has { default: ..., __esModule: true } and the loader is happy.

Install

Same as before — download main.js, manifest.json, styles.css from the release and drop them into .obsidian/plugins/picfast-image-uploader/ (overwrite the v0.1.0 / v0.1.1 files).