google / playground-elements

Serverless coding environments for the web.
BSD 3-Clause "New" or "Revised" License
550 stars 55 forks source link

Release 0.19.1 looks broken: preview eventually erroring with 404 #418

Open tbroyer opened 1 month ago

tbroyer commented 1 month ago

I wanted to update my blog's dependencies and noticed my playground elements' preview no longer working. Rolling back to 0.18.1 made it functional again.

Reproduced in the demo at https://google.github.io/playground-elements/ with Firefox and Chrome.

Maybe latest on NPM should be rolled back to 0.18.1 so people aren't being upgraded to 0.19.1 by tools such as Dependabot/Renotave or npm-check-updates?

tbroyer commented 1 month ago

Tracked to being a side effect of https://github.com/google/playground-elements/pull/398; I left a comment there (h/t @oscarmarina)

justinfagnani commented 1 month ago

So the issue is that internal/typescript.js needs to be be copied along with playground-typescript-worker.js? I think we could copy typescript.js to a less scary sounding name than internal/... and add it to the docs under bundling. Or we could figure out a way to not bundle typescript.js in dev, but bundle it for release.

0.19 would be a breaking change over 0.18, so I don't think we need to roll anything back. Right now I'd say we have missing docs.

tbroyer commented 1 month ago

Would be great if it was bundled into the worker script for release, as it would then continue to "just work" with @web/rollup-plugin-import-meta-assets (I can't tell for Webpack, haven't used it for at least half a decade). With this plugin, Rollup currently copies and renames the worker script, but as it doesn't process it it doesn't copy the typescript.js file.

But if you know of other ways to make it seamless (maybe just document the copy plugin for rollup then?) then yes I agree it's mainly a documentation issue.