Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow specifying nonce in global config #448

Merged
merged 1 commit into from
Aug 28, 2023
Merged

feat: allow specifying nonce in global config #448

merged 1 commit into from
Aug 28, 2023

Conversation

arturovt
Copy link
Contributor

@arturovt arturovt commented Aug 25, 2023

What is it?

  • Feature / enhancement

Description

This commit updates the signature of the PartytownConfig interface to include
the nonce property. The nonce property can now be specified globally and will be
subsequently set on script elements created by Partytown.

@vercel
Copy link

vercel bot commented Aug 25, 2023

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

Name Status Preview Comments Updated (UTC)
partytown ❌ Failed (Inspect) Aug 26, 2023 7:39pm

export interface PartytownProps extends PartytownConfig {
nonce?: string;
}
export interface PartytownProps extends PartytownConfig {}
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we removing this property here?

Copy link
Contributor Author

@arturovt arturovt Aug 26, 2023

Choose a reason for hiding this comment

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

This was added recently in one of the commits. However, it only covered React configuration. Since 'nonce' is declared in the global config, there’s no need to retain the property in this interface, as it's already present in the extended interface.

This commit updates the signature of the `PartytownConfig` interface to include
the `nonce` property. The `nonce` property can now be specified globally and will be
subsequently set on `script` elements created by Partytown.
@mhevery mhevery merged commit 5d71e43 into QwikDev:main Aug 28, 2023
@arturovt arturovt deleted the feat/nonce-global branch August 28, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants