-
Notifications
You must be signed in to change notification settings - Fork 0
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
Upload and execute bundles #4
Comments
The strategy I'm currently pursuing:
Deno seems to care about the file extension. This is important because we are generating our own outfile path. If we don't change it from ".ts", we get:
Note the compile step that deno reports. If we append .js to the filename we get
The makeuser.ts.js script has no imports and executes fine. |
So a problem here is that locally I was compiling with v0.20, which is quite out of date. And in the target container I was running the latest install. Bundling formats have changed a lot. Locally on my laptop I was still using |
Bundling support is almost here. Test it out and upload bundles into virtual machines and containers for bigger, more complex provisioning use cases.
The idea here is to avoid fetching and compiling code on the target machine, so we will require (by default), a local deno installation. This will speed up repeated packer builds since unchanged bundles could be cached and uploaded right away (instead of fetching/recompiling every time on the clean target environment).
We should, of course, allow overriding this behavior so that deno on the target machine can fetch and compile code. Not everyone who runs packer will want or be able to install Deno locally. But I think the common case will benefit from local compilation.
Besides, I want to figure out the whole ship-compiled-code thing ;-)
The text was updated successfully, but these errors were encountered: