Skip to content

feat: generate script text at build time #354

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dario-piotrowicz
Copy link

Fixes #349

@@ -11,7 +11,7 @@ export const script = (
const el = document.documentElement
const systemThemes = ['light', 'dark']

function updateDOM(theme: string) {
function updateDOM(theme) {
Copy link
Author

Choose a reason for hiding this comment

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

Note: if there is a concern about loosing typesafety here this solution can be improved by either using jsdoc type comments here or adding a custom esbuild loader to the tsup config,

@eposha
Copy link

eposha commented Apr 24, 2025

Is it possible to review and merge?

@vicb
Copy link

vicb commented Apr 28, 2025

@pacocoursey The PR would help with the Cloudflare adapter for OpenNext - is there anything missing from the PR before it can be merged?
🙏

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.

[Feature request]: generate the script string at build time
3 participants