rollup-plugin-gleam

Vite compatible Rollup plugin for Gleam language

Commits at b1fe4e81cd05bf337caf4fdc820636482e494568

  1. 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
  2. 2bfeb16e v0.1.1 Shota FUJI authored at Shota FUJI comitted at
  3. 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
  4. 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
  5. 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
  6. 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
  7. b59b4f05 Fix broken link in CHANGELOG Shota FUJI authored at Shota FUJI comitted at
  8. 2f13599a Workaround for setup-node can't read .tool-versions correctly Shota FUJI authored at Shota FUJI comitted at
  9. 0256f702 v0.1.0 Shota FUJI authored at Shota FUJI comitted at
  10. c30e9744 Setup GitHub Actions Shota FUJI authored at Shota FUJI comitted at
  11. 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
  12. 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
  13. 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