-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 begin adapter to new app-utils format #220
Conversation
a4eb8b0
to
8606160
Compare
@antony just fyi, it looks like this PR will need to be rebased |
8606160
to
dce3cd3
Compare
dce3cd3
to
3a9a293
Compare
@antony it looks like you need to run prettier to make lint pass |
3a9a293
to
94e63c5
Compare
So, this PR is now really only blocked by #324 - if anybody can clarify my understanding of that, or if there needs to be a fix, we should be ready to go. |
Just to detail the static assets issue: When "adaptors" transform the output, they place static assets into one location, lambdas into another location, manifests and shared stuff into a location, etc. On begin, static assets are only served statically from We can use fingerprinting to build a manifest of assets, and then iterate these to serve them up from the lambda, but this is inefficient, and also doesn't work, since the manifest of assets is built at deploy time, this is after the adaptor is run. it's been a while since I worked on this due to the other blocking issue which is a dependency issue. However, I did spend a long time trying to get to the end goal which was static asset (js, the public dir etc) being served from |
const parse = require('@architect/parser'); | ||
const child_process = require('child_process'); | ||
const { prerender, generate_manifest_module } = require('@sveltejs/app-utils/renderer'); | ||
const { readFileSync, existsSync } = require('fs'); |
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.
Assuming #379 is merged, you'll want to convert this to ES6. I didn't touch the Begin adapter to avoid a merge conflict with this PR
4891291
to
b9b0d50
Compare
Merging so that this can be kept up to date more easily. |
This is a partial rewrite of the begin adapter which appears to now be fully working with the exception of:
Once static assets are working, this should be good to go.