microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.28k stars 595 forks source link

fix: update fast element export paths with extensions #6815

Closed chrisdholt closed 1 year ago

chrisdholt commented 1 year ago

Pull Request

📖 Description

This PR updates the fast-element export paths to include extensions.

With import maps now providing a standard for package resolution in browsers and other JavaScript runtimes, using the extensionless style can result in bloated import map definitions. Explicit file extensions can avoid this issue by enabling the import map to utilize a packages folder mapping to map multiple subpaths where possible instead of a separate map entry per package subpath export. This also mirrors the requirement of using the full specifier path in relative and absolute import specifiers.

See here for more: https://nodejs.dev/en/api/v18/packages/#extensions-in-subpaths

🎫 Issues

Part of #6809

👩‍💻 Reviewer Notes

Build should pass w/o API changes

nicholasrice commented 1 year ago

Should we update all package's w/ export paths along with fast-element? Seems it would be good to keep everything consistent.

chrisdholt commented 1 year ago

Should we update all package's w/ export paths along with fast-element? Seems it would be good to keep everything consistent.

@nicholasrice yes, I think so but I first wanted to focus on the immediate and "breaking" things...which I see there are some in SSR. I'll do another run to make sure we get all existing...