rollup-plugin-gleam

Vite compatible Rollup plugin for Gleam language

Commits at 023edb0babd8e6feae249b4e2460fbe119b84339

  1. 023edb0b Abort build with wrapped error if gleam.toml is missing The latest Vite (v7) exits with cryptic "error: undefined" like message if a plugin throws an exception. I don't know that has been a thing or newly introduced "feature", but this patch (should) fix that. Shota FUJI authored at Shota FUJI comitted at
  2. 717131d2 Improve grammar of docs/DEVELOPMENT.md Shota FUJI authored at Shota FUJI comitted at
  3. a466f115 Rename output directory from esm/es2020 to esm/es2022 Output target is now es2022. Shota FUJI authored at Shota FUJI comitted at
  4. 3ad764fa v0.1.2 Shota FUJI authored at Shota FUJI comitted at
  5. b1fe4e81 Switch TOML parser from js-toml to smol-toml To reduce the number of transitive dependencies. js-toml depends on chevrotain, which brings a lot of dependencies. I had to change `tsconfig.{lib,target}` otherwise smol-toml's type definition errors. However, since Node.js v18 (Maintenance LTS) supports ES2022, this is not a problem. Shota FUJI authored at Shota FUJI comitted at
  6. 2bfeb16e v0.1.1 Shota FUJI authored at Shota FUJI comitted at
  7. c372faf7 Workaround for Vite crashes on compile error Vite does not implement `watchChanges` hook correctly. It crashes when an error is thrown during the hook instead of displaying an error message like other hooks. Due to this, everytime Gleam compiler exits with non-zero code, Vite server shuts down. That makes this plugin almost unusable during development. I could file a bug report on Vite side, but considering the speed of merge process and supporting older versions, I decided to ditch the `watchChanges` hook. Shota FUJI authored at Shota FUJI comitted at
  8. 562838aa Comment on Vite's watchChange bug Vite's docs does not state `watchChange` so it's better to avoid the hook entirely though. Shota FUJI authored at Shota FUJI comitted at
  9. 2c889fe7 Fix Gleam compilation runs twice for single file change I assumed Rollup/Vite's `addWatchFile` do deduplication, like `Set`, but it turned out they don't. Shota FUJI authored at Shota FUJI comitted at
  10. bb206486 Fix package and type definition can't be imported The `types` field is for projects using `moduleResolution` other than `NodeNext`. Shota FUJI authored at Shota FUJI comitted at
  11. b59b4f05 Fix broken link in CHANGELOG Shota FUJI authored at Shota FUJI comitted at
  12. 2f13599a Workaround for setup-node can't read .tool-versions correctly Shota FUJI authored at Shota FUJI comitted at
  13. 0256f702 v0.1.0 Shota FUJI authored at Shota FUJI comitted at
  14. c30e9744 Setup GitHub Actions Shota FUJI authored at Shota FUJI comitted at
  15. 656a1bf7 Change tsconfig.build.json to JSONC To reduce the number of top-level files. `.jsonc` file extension is actually most accurate for tsconfig file: it allows comments regardless of a file extension. Shota FUJI authored at Shota FUJI comitted at
  16. fa8e4294 Change dprint config file from JSON to JSONC To reduce the number of top-level files. JSONC can include comment header. Shota FUJI authored at Shota FUJI comitted at
  17. 2f08880b Initial commit I want each commits to be atomic and perfect. That's why this commit is so big... Shota FUJI authored at Shota FUJI comitted at