-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add --no-inline build flag (for CSP compatibility) #593
Comments
You can manually modify webpack config but it's kinda verbose, we can add new build option (https://saber.land/docs/saber-config.html#build) to control this. Similar to this option (https://poi.js.org/config.html#assets-inlineimagemaxsize) in Poi. CSS can already be extracted https://saber.land/docs/saber-config.html#extractcss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature request
What problem does this feature solve?
It would allow users to keep very strict CSP directives (since the output is often a simple static site) by removing inlined styles and base64-inlined images.
What does the proposed API look like?
Maybe a
--no-inline
flag passed in tosaber build
?How should this be implemented in your opinion?
When the flag is present, CSS should be written to their own files instead of being inlined in the document's
<head>
, same for images (maybe this can already be avoided by usingsaber-image
, I've yet to test that?).Are you willing to work on this yourself?
Yes, with some guidance 🙏
Sorry if this is already somehow solvable by existing features.
The text was updated successfully, but these errors were encountered: