-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix(android): bundle webp res files #14047
Conversation
Test: const win = Ti.UI.createWindow();
var img = Ti.UI.createImageView({
image: "/images/image.webp"
});
win.add(img);
win.open(); download this ZIP and extract it into /app/assets/ |
@@ -157,7 +157,7 @@ | |||
"rollup": "2.76.0", | |||
"ssri": "10.0.4", | |||
"stream-splitter": "0.3.2", | |||
"strip-ansi": "7.1.0", | |||
"strip-ansi": "6.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we need to downgrade here? If it's the ESM issue, I wonder why it worked before, as there were no ESM related changes between 12_3_X and master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like strip-ansi is only used in npm run test
the rest worked fine and the github action doesn't run the tests and I only tested apps and modules after updating the package.json the last time.
I can remove the test for now so it will only be the one webp
line and can add the test with the downgrade later
looks like there is a file that collects all image types in the build process and
webp
was not an option in there :) Downside: if you useassets/android/images/res-xxxhdpi/
with a webp file it won't include that.Using Android Studio you can see that it only includes res files for JPG images (or PNG):
the webp file doesn't have dpi folders.
With this PR:
Tests
I've also added a visual test with /res files. Currently only for a xxhdpi emulator. I had to downgrade strip-ansi again as that version was an ESM version and the tests wouldn't open. 6.0.1 is the last non ESM version for now