0
0
Svelteframework~20 mins

Vercel and Netlify deployment in Svelte - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Svelte Deployment Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
component_behavior
intermediate
2:00remaining
What happens when you deploy a Svelte app to Vercel without a build script?

You deploy a Svelte app to Vercel but forget to add a build script in package.json. What will Vercel do?

AVercel will fail the deployment with a build error because it cannot find a build script.
BVercel will deploy the app successfully using the default Svelte build process.
CVercel will deploy the app but serve the source files without building.
DVercel will automatically add a build script and deploy the app.
Attempts:
2 left
💡 Hint

Think about what Vercel needs to build your app.

📝 Syntax
intermediate
2:00remaining
Which netlify.toml config correctly sets the build command for a SvelteKit app?

Choose the correct netlify.toml snippet to build a SvelteKit app on Netlify.

A
"tuptuo/tik-etlevs." = hsilbup
"dliub nur mpn" = dnammoc
]dliub[
B
[build]
command = "svelte-kit build"
publish = "build"
C
[build]
command = "npm run build"
publish = "public"
D
[build]
command = "npm run build"
publish = ".svelte-kit/output"
Attempts:
2 left
💡 Hint

Where does SvelteKit output the built files by default?

🔧 Debug
advanced
2:00remaining
Why does the deployed Svelte app on Netlify show a blank page?

You deployed your Svelte app to Netlify, but the page is blank with no errors. What is the most likely cause?

AThe app is missing a <code>package.json</code> file, so dependencies are not installed.
BThe <code>publish</code> directory in <code>netlify.toml</code> is set incorrectly, so static files are missing.
CNetlify does not support Svelte apps, so it cannot serve the files.
DThe app uses server-side rendering, which Netlify cannot handle.
Attempts:
2 left
💡 Hint

Check where your built files are and what Netlify serves.

🧠 Conceptual
advanced
2:00remaining
How does Vercel handle serverless functions in a SvelteKit app deployment?

When deploying a SvelteKit app with serverless functions to Vercel, how are these functions managed?

AVercel automatically detects and deploys serverless functions from the <code>api</code> folder as separate serverless endpoints.
BServerless functions must be manually configured in Vercel dashboard to work with SvelteKit.
CVercel does not support serverless functions in SvelteKit apps; you must use a separate backend.
DServerless functions are bundled into the client-side JavaScript and run in the browser.
Attempts:
2 left
💡 Hint

Think about how Vercel treats API routes.

state_output
expert
3:00remaining
What is the effect of environment variables on SvelteKit deployment on Netlify?

You set environment variables in Netlify's dashboard for your SvelteKit app. How do these variables affect the deployed app's behavior?

AEnvironment variables set in Netlify override those in <code>.env</code> files and are accessible only on the client side.
BEnvironment variables are automatically injected into both server and client code without extra configuration.
CEnvironment variables are available only during build time and cannot be accessed in client-side code unless explicitly exposed.
DEnvironment variables are ignored by SvelteKit when deployed on Netlify.
Attempts:
2 left
💡 Hint

Consider build time vs runtime and client vs server code.