-
-
Notifications
You must be signed in to change notification settings - Fork 919
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
Manganis: Preserve Folder Files By Default #3293
base: main
Are you sure you want to change the base?
Conversation
It seems that the extra processing of the folder contents was a mistake / bad default, seems like we want to preserve contents by default and make optimization opt-in |
preserve_files
option for FolderAsset
What is the advantage of different default optimizations for folders vs files? I would expect these two to point to the same asset: const FOLDER: ASSET = asset!("/myfolder");
const ASSET: ASSET = asset!("/myfolder/asset.js");
rsx! {
script { src: "{FOLDER}/asset.js" }
script { src: ASSET }
} If asset optimization is breaking some files, we could make it opt in instead of opt out, or just fix the broken optimizations. Either way, I think we should be consistent about the default options regardless of how you import the asset |
I'm mixed between both approaches as one could say that the |
IMO asset-optimization ought to be opt-in in general. People wanted asset optimization will likely go looking for a setting and find it easily enough. People not wanting optimization are more likely to be surprised by it happening. |
…preserve-files
Adds a
optimize_files
option forFolderAsset
e.g.If the flag is set, the file will go under minor processing. The flag defaults to
false
.