-
Notifications
You must be signed in to change notification settings - Fork 765
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
refactor(wrangler): generate bundle meta file #7927
base: main
Are you sure you want to change the base?
Conversation
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-wrangler-7927 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7927/npm-package-wrangler-7927 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-wrangler-7927 dev path/to/script.js Additional artifacts:cloudflare-workers-bindings-extension: wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-workers-bindings-extension-7927 -O ./cloudflare-workers-bindings-extension.0.0.0-v5f70f83bb.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v5f70f83bb.vsix create-cloudflare: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-create-cloudflare-7927 --no-auto-update @cloudflare/kv-asset-handler: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-kv-asset-handler-7927 miniflare: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-miniflare-7927 @cloudflare/pages-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-pages-shared-7927 @cloudflare/unenv-preset: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-unenv-preset-7927 @cloudflare/vite-plugin: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-vite-plugin-7927 @cloudflare/vitest-pool-workers: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-vitest-pool-workers-7927 @cloudflare/workers-editor-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-workers-editor-shared-7927 @cloudflare/workers-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-workers-shared-7927 @cloudflare/workflows-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13011893122/npm-package-cloudflare-workflows-shared-7927 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
I added a test. Could anybody please confirm that generating the file in the |
That will depend upon whether it matches a "additional module rule" and whether |
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.
I think this should be explicitly opt-in rather than inferred from the outdir.
E.g. --metafile
or similar
The opt-in would default to false. A value equivalent to true
could default to putting the metafile in the outdir if no other value is provided.
E.g. --metafile=path/to/metafile.json
.
Thanks for the review @petebacondarwin, I have a few follow up questions:
Could you please point me to the code?
Then I thought that we already have an I also see that we always generate the metadata so the only override here is to dump to disk. So I'm wondering if we really need that |
It is not uncommon to run |
Yes I was proposing that we have a |
Oh I see, good point - and in this case the I'll update the PR to add |
Fixes #4633
Hey @penalosa or @petebacondarwin, could you please point me to the best place to add tests for that?
I tested locally and it works fine but we need to add test.
Thanks!
I'll also add a changeset before merging.