Skip to content

move import maps shim to polyfills plugin #1114

Description

@thescientist13

Summary

Coming out of #1268 / #1269 and related to #1114, instead of deprecating import maps support and now that Safari 16.4 supports them, we should just move it to the polyfills plugin instead.

With both Chrome and Firefox now natively supporting import maps, there is less of a need to autoload es-module-shims when running greenwood develop.

Screenshot 2024-09-04 at 9 21 42 AM

Details

So we would want to do the following from the polyfills plugin instead:

  1. Move the shim JavaScript from being added to the page
  2. Move the logic for adding / remove the shim attributes from <script> tags
  3. Move the dependency from package.json
  4. Update the How It Works section of the docs to call out support level? - new website will be in effect, so not applicable
  5. Could we get by supporting this if it doesn't cover Safari 15.x? Perhaps we could put it into our polyfills plugin? - Indeed :D

Related, we could probably drop the Polyfill plugin in greenwood.config.js for the website too, but could make that another PR.

Metadata

Metadata

Labels

CLIPluginsGreenwood PluginsbreakingdocumentationGreenwood specific docsenhancementImprove something existing (e.g. no docs, new APIs, etc)

Type

No fields configured for Task.

Projects

Status
🏗 In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions