diff --git a/prosekit-editor.js b/prosekit-editor.js index 60d2561..11662ca 100644 --- a/prosekit-editor.js +++ b/prosekit-editor.js @@ -19,8 +19,14 @@ // precise `definePasteHandler` callback signature. Everything else here // mirrors prosekit's own documented examples closely. -import 'https://esm.sh/prosekit/basic/style.css' -import 'https://esm.sh/prosekit/basic/typography.css' +// CSS is loaded via ensureStylesheet() (a tag) inside +// mountEditor below, not a JS import - esm.sh serves these paths as a +// redirect to a real text/css response, which a plain `import 'x.css'` +// (no `with { type: 'css' }` assertion, which browsers don't uniformly +// support yet) fails to load as a module and aborts this entire file's +// evaluation. Confirmed the hard way: this is exactly what silently +// broke the first deploy of this file - mountEditor never got defined, +// so the visible editor container just stayed empty. import { defineBasicExtension } from 'https://esm.sh/prosekit/basic' import { createEditor,