Closed varna closed 2 months ago
Note that this requirement is only for local development of mapbox-gl-draw
— downstream consumers that bundle mapbox-gl-draw
in their apps don't have to adhere to the requirement. This is why I've been avoiding specifying engines
for such projects. Not sure if we want to keep it.
Oh well, then shall we go with .nvmrc
instead? @mourner
I thought engines
was not enforced without engines-strict
. And vite
has engines
set too. So downstream user would need to use Draw as dev dependency anyway then (and bundler). Or via CDN. In theory Draw should work with node14 (es2020). But node18 is actually the latest maintained version (and the one used by Vite), so I wouldn't recommend using anything older.
Actually, this project doesn't even really need Node to run. Currently only dependence is probably node test runner. It should be easy to replace it with Vitest. Then you could use this as ES on anything (Node, Bun or Deno).
https://github.com/mapbox/mapbox-gl-draw/pull/1242 switched project to Vite and ESM. This means that this project currently supports node version
^18.0.0 || >=20.0.0
https://vitejs.dev/guide/#scaffolding-your-first-vite-projectBy adding
engines.node
topackage.json
we gain some extra features: