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

Use 'swap' strategy in inline-critical #582

Closed
wants to merge 1 commit into from

Conversation

kyrylkov
Copy link

Addresses #581

@bezoerb
Copy link
Collaborator

bezoerb commented Jan 27, 2024

the strategy can already be passed as option to inline-critical:

generate({
  ...
  inline: {
    strategy: 'swap
  }
});

or using the cli:

critical my.url.com --inline-strategy=swap

const inlined = inlineCritical(document.contents.toString(), criticalCSS, {
...inline,
basePath: document.cwd,
strategy: 'swap'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This prevents the strategy from being set via options

@bezoerb bezoerb closed this Jan 27, 2024
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