Skip to content

Commit

Permalink
clarify expecations around ESM compatiblity for import maps
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jan 27, 2025
1 parent b561ba4 commit a4c545c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/docs/introduction/web-standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export async function handler(request) {

## Import Maps

During local development, Greenwood serves all resources to your browser unbundled right off disk using efficient [E-Tag caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag). [**Import Maps**](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) allow bare specifiers, typically found when referencing packages from npm, to work natively in the browser. When Greenwood sees a package in the **dependency** field of your _package.json_, Greenwood will walk all your dependencies and build up an import map to be injected into the `<head>` of your HTML automatically, in conjunction with Greenwood's dev server.
During local development, Greenwood serves all resources to your browser unbundled right off disk using efficient [E-Tag caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag). [**Import Maps**](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) allow bare specifiers for ESM compatible packages installed from npm to work natively in the browser. When Greenwood sees a package in the **dependency** field of your _package.json_, Greenwood will walk all your dependencies and build up an import map to be injected into the `<head>` of your HTML automatically, in conjunction with Greenwood's dev server.

Below is a sample of an import map that would be generated after having installed the **lit** package:

Expand Down

0 comments on commit a4c545c

Please sign in to comment.