-
Notifications
You must be signed in to change notification settings - Fork 130
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
improve bundled assets handling #325
improve bundled assets handling #325
Conversation
🦋 Changeset detectedLatest commit: 871f784 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🧪 Prereleases are available for testing 🧪 @cloudflare/next-on-pagesYou can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/5552609824/npm-package-next-on-pages-325 @cloudflare/eslint-plugin-next-on-pagesYou can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/5552609824/npm-package-eslint-plugin-next-on-pages-325 |
packages/next-on-pages/src/buildApplication/generateGlobalJs.ts
Outdated
Show resolved
Hide resolved
d555515
to
25e5902
Compare
60c88bc
to
a5d4b8b
Compare
PS: these changes should replicate the fetchInlineAsset's functionality (I think they do) |
a5d4b8b
to
8680420
Compare
const assetsDir = join(distDir, 'assets'); | ||
await mkdir(assetsDir); | ||
for (const { filename, originalFileLocation } of bundledAssetsInfo.values()) { | ||
const newLocation = join(assetsDir, `${filename}.bin`); |
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.
This saddens me :(
We need to give frameworks a way to emit a manifest with content-types which Wrangler can pick up cc. @RamIdeas .
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.
Tentatively approved, pending comments in DM
659249c
to
146cc26
Compare
This PR allows us to handle vercel asset fetches such as the one present in this example: https://vercel.com/docs/concepts/functions/edge-functions/og-image-generation/og-image-examples#using-a-custom-font
Which makes it possible to use
@vercel/og
🚀 😄Result:
simple-wasm-pages-13.3.1 deployed at: https://a9aeda25.next-on-pages-test-5h3.pages.dev
resolves #39