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

Update linker to provide new webviewAssets field #22

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

ObsidianSnoo
Copy link
Collaborator

💸 TL;DR

  • Updated local asset support to provide webview assets from the new map in the bundle.
  • Cleaned up uses a bit

🧪 Testing Steps / Validation

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@ObsidianSnoo ObsidianSnoo requested a review from niedzielski June 13, 2024 19:15
@@ -60,7 +60,7 @@
"gzip": "3.5 KB"
},
"dist/play-pen.js": {
"none": "37000 KB",
"none": "37200 KB",
Copy link
Member

Choose a reason for hiding this comment

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

wow. I wonder what changed to cost so much. I don't think we had any big bumps in the other repos. I was expecting this to go down since we had so many deletions from @devvit/protos for post guidance and it's kind of a bummer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure! There's also a discrepancy between the compressed sizes on github actions vs local build. I had to bump the gzip'd size for play-pen.js although it passes locally.

@@ -1,21 +1,29 @@
import type {LinkedBundle, SerializableServiceDefinition} from '@devvit/protos'
import type {AssetMap} from '@devvit/shared-types/Assets.js'

type LinkerAssetMaps = {
// Standard assets from the /assets project path
Copy link
Member

Choose a reason for hiding this comment

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

💅 suggest JSDocs so the IDE reports these docs.

@ObsidianSnoo ObsidianSnoo force-pushed the webview-asset-updates branch from 4b2c770 to 2014fbb Compare June 13, 2024 19:25
@niedzielski niedzielski mentioned this pull request Jun 14, 2024
3 tasks
@ObsidianSnoo ObsidianSnoo merged commit c1e6228 into main Jun 17, 2024
1 check passed
@ObsidianSnoo ObsidianSnoo deleted the webview-asset-updates branch June 17, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants