Use the top-level suffix for the default package spec
Why
Without "package-specs", the build used a default spec with its own suffix ".js", so a top-level "suffix" was ignored with no warning. The default spec now has no suffix of its own and falls back to the top-level one, like an explicit spec without "suffix" does. Fixes #9312.
modifiedConfig default package spec, Config.decode_package_specs
representation
Before
After
{"suffix": ".res.mjs"} ↦ src/Main.js{"suffix": ".res.mjs"} ↦ src/Main.res.mjs{} ↦ src/Main.js{} ↦ src/Main.js
Review
- Was ".js" deliberate? No. The Rust build system had the same hard-coded default since its first version, and the OCaml port kept it with a test that pinned it. That test now expects the top-level suffix.