Skip to content

Docs/csp guide#947

Merged
rwaskiewicz merged 8 commits intomasterfrom
docs/csp-guide
Jan 17, 2023
Merged

Docs/csp guide#947
rwaskiewicz merged 8 commits intomasterfrom
docs/csp-guide

Conversation

@tanner-reits
Copy link
Copy Markdown
Contributor

Adds a guide to the "Guides" section for using CSP nonces in Stencil. This covers some basic introduction to what a CSP/nonce is as well as the niche behavior for ingesting nonces into Stencil.

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stencil-site ✅ Ready (Inspect) Visit Preview Jan 10, 2023 at 7:00PM (UTC)

@tanner-reits
Copy link
Copy Markdown
Contributor Author

@rwaskiewicz I might be missing something here. I needed to add a page to the side-nav (which I haven't done before), but when I look at the Vercel deployment this PR generated, clicking the new guide just shows the JSON asset generated from the markdown. Did I configure something wrong?

@rwaskiewicz
Copy link
Copy Markdown
Member

@tanner-reits Yeah, if you can run npm run build, which runs the docs script and generates everything for you (or should 🤔)

@tanner-reits
Copy link
Copy Markdown
Contributor Author

@rwaskiewicz Ah thanks! That was the secret sauce, but I also copied the header/metadata section from the only doc in that directory that didn't have the url attribute set which was also causing problems 🙄 All should be well now with the Vercel preview!

Copy link
Copy Markdown
Member

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one outstanding question for v3


import { defineCustomElements, setNonce } from 'my-lib/dist/components';
// We'll assume we have `autoDefineCustomElements` enabled
// Assume `autoDefineCustomElements` is enabled enabled
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we want to handle this once autoDefineCustomElements goes away in v3.0.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this lands and we rebase v3, I can put up a small PR to change this comment to the export behavior instead

Copy link
Copy Markdown
Contributor

@alicewriteswrongs alicewriteswrongs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants