AlaskaAirlines / auro-menu

Custom element that provides a list of options for the user to choose from
https://auro.alaskaair.com/components/auro/menu
Apache License 2.0
2 stars 3 forks source link

Add SSR Support #188

Closed blackfalcon closed 10 months ago

blackfalcon commented 10 months ago

Discussed in https://github.com/AlaskaAirlines/WC-Generator/discussions/457

Originally posted by **blackfalcon** January 9, 2024 As of Lit 2.0 it's been understood that LitElement web components will be supported inside common SSR environments. This discussion is for supporting the various updates needed to deliver this capability.

Scope

The scope of this issue is to update the repo with the following criteria

  1. install the auro-library as root dependency
  2. add type="module" to the ./package.json
  3. commitlint.config.js → commitlint.config.cjs
  4. delete the following local scripts
    • . /packageScripts/postinstall.(m)js
    • ./scripts/generateDocs.(m)js
    • ./scripts/postCss.(m)js
    • ./scripts/pre-commit.(m)js
  5. Update the ./package.json "scripts" references
"build:docs": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/generateDocs.mjs",
"preCommit": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/pre-commit.mjs",
"postCss:component": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/postCss.mjs",
"postinstall": "node ./node_modules/@aurodesignsystem/auro-library/scripts/build/postinstall.mjs",

Exit criteria

This issue can be closed once the local files have been deleted, the dependencies and scripts have been updated and the rebuilds successfully off of the auro-library resources.

All local dependencies should be up to date as well.