AlaskaAirlines / auro-accordion

Custom element that allows users to toggle the display for sections of content
https://auro.alaskaair.com/components/auro/accordion
Apache License 2.0
1 stars 1 forks source link

Add SSR support #91

Closed blackfalcon closed 7 months ago

blackfalcon commented 7 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 dependency
  2. add type="module" to the ./package.json
  3. delete the following local scripts
    • . /packageScripts/postinstall.(m)js
    • ./scripts/generateDocs.(m)js
    • ./scripts/postCss.(m)js
    • ./scripts/pre-commit.(m)js
  4. 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.