-
Notifications
You must be signed in to change notification settings - Fork 98
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
Poor performance because wrangler is not cached or in-lined #60
Comments
dist
folder is not used
Once we have more of the Wrangler API built out we could use it as a dependency + bundle it into the action. Right now, however, we cannot. We could theoretically use cache here, I'm not too sure it'll make a big improvement. 19 seconds is still a pretty short time. |
Unless I'm missing something: Given the Wrangler CLI is already an NPM package, is there any reason it doesn't export its main program to be invoked programmatically? It wouldn't increase the API surface of that package at all, but it would allow this package to import |
This action invokes
npx wrangler
via the shell:pages-action/src/index.ts
Line 37 in 0fc25c3
This causes NPM to re-download and re-install
wranger
on each invocation of this action.Notice how there is an NPM warning that it will need to install wrangler.
We're considering migrating from Netlify to Cloudflare Pages - to deploy the same site,
nwtgck/actions-netlify
takes 2 seconds while this action takes 19 seconds.If
wrangler
was in-lined / cached by this action, the deployment would take much less time to finish.The text was updated successfully, but these errors were encountered: