Vercel is a platform that helps you easily deploy and host web projects, especially those built with modern frameworks like Svelte. It automates building and publishing your site online.
Click to reveal answer
beginner
How does Netlify simplify deploying a Svelte app?
Netlify connects to your code repository and automatically builds and publishes your Svelte app when you push changes. It also provides features like custom domains and HTTPS with little setup.
Click to reveal answer
intermediate
What file is important to configure for Svelte deployment on Vercel or Netlify?
The svelte.config.js file helps set up how your Svelte app builds. Also, package.json scripts like build tell the platform how to create the final site.
Click to reveal answer
intermediate
What is the role of the vercel.json or netlify.toml file?
These files let you customize deployment settings like redirects, environment variables, and build commands specific to Vercel or Netlify.
Click to reveal answer
beginner
Why is continuous deployment useful with Vercel and Netlify?
Continuous deployment means your site updates automatically whenever you change your code. This saves time and keeps your live site fresh without manual steps.
Click to reveal answer
Which platform automatically builds and deploys your Svelte app when you push code to GitHub?
ANetlify
BBoth Vercel and Netlify
CVercel
DNeither
✗ Incorrect
Both Vercel and Netlify connect to your GitHub repository and automatically build and deploy your app when you push code.
What file typically contains build commands for deploying a Svelte app?
Aapp.js
Bindex.html
CREADME.md
Dpackage.json
✗ Incorrect
The package.json file includes scripts like 'build' that tell the deployment platform how to build your app.
Which file would you edit to add custom redirects on Netlify?
Anetlify.toml
Bvercel.json
Csvelte.config.js
Dpackage.json
✗ Incorrect
The netlify.toml file is used to configure redirects and other settings on Netlify.
What is a key benefit of continuous deployment?
AAutomatic site updates on code changes
BManual site updates
CSlower deployment
DNo need for version control
✗ Incorrect
Continuous deployment automatically updates your live site whenever you push code changes.
Which platform is known for easy integration with Next.js but also supports Svelte?
ANetlify
BGitHub Pages
CVercel
DHeroku
✗ Incorrect
Vercel is famous for Next.js support but also supports Svelte and other frameworks.
Explain how you would deploy a Svelte app using Vercel from start to finish.
Think about linking your code, telling Vercel how to build, and letting it publish your site.
You got /4 concepts.
Describe the differences and similarities between deploying a Svelte app on Netlify versus Vercel.
Focus on deployment automation, configuration files, and hosting features.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of using Vercel or Netlify with a Svelte app?
easy
A. To write Svelte code faster using special editors
B. To easily deploy and host the app online with automatic updates
C. To convert Svelte code into plain HTML manually
D. To debug Svelte apps without running them
Solution
Step 1: Understand deployment platforms
Vercel and Netlify are services that host web apps and update them automatically when code changes.
Step 2: Connect with Svelte app workflow
They connect to your Git repo, build your Svelte app, and publish it online without manual steps.
Final Answer:
To easily deploy and host the app online with automatic updates -> Option B
Quick Check:
Deployment = Easy hosting and updates [OK]
Hint: Think: Vercel/Netlify = online hosting + auto updates [OK]
Common Mistakes:
Confusing deployment with coding or debugging tools
Thinking they convert code manually
Assuming they only help with writing code
2. Which of the following is the correct step to deploy a Svelte app on Netlify?
easy
A. Set build command to 'npm run start' and publish directory to 'public'
B. Upload your Svelte files manually without any build settings
C. Connect Git repo and set build command to 'npm run build' with publish directory 'public/build'
D. Connect your Git repository, set build command to 'npm run build', and publish directory to 'build'
Solution
Step 1: Identify Netlify build settings for Svelte
Netlify needs the build command 'npm run build' to compile the app and the publish directory where the built files are stored.
Step 2: Know Svelte's default build output
Svelte outputs built files in 'public/build', so this should be the publish directory.
Final Answer:
Connect Git repo and set build command to 'npm run build' with publish directory 'public/build' -> Option C
Quick Check:
Netlify build = 'npm run build' + 'public/build' [OK]
Setting publish directory to 'build' instead of 'public/build'
Uploading files manually without build
3. Given this Vercel deployment setting for a Svelte app: Build Command: npm run build Output Directory: build What will happen when you push new code to Git?
medium
A. Vercel will build the app and deploy files from the 'build' folder
B. Vercel will fail because the output directory should be 'public/build'
C. Vercel will deploy the app but with old code only
D. Vercel will skip build and deploy source files directly
Solution
Step 1: Understand Vercel build and output settings
Vercel runs the build command to create production files, then deploys from the specified output directory.
Step 2: Check if 'build' is valid output directory
In many Svelte setups, the build output is in 'build' or 'public/build'. If 'build' is correct, deployment succeeds.
Final Answer:
Vercel will build the app and deploy files from the 'build' folder -> Option A
Forgetting to connect Git repo (would block deploy)
Confusing build command with publish directory
5. You want to deploy a Svelte app on Vercel with these requirements: - Use GitHub repo - Automatically rebuild on push - Serve from 'public' folder Which setup is correct?
hard
A. Connect GitHub repo, set build command 'npm run build', output directory 'public'
B. Connect GitHub repo, set build command 'npm run dev', output directory 'public/build'
C. Connect GitHub repo, set build command 'npm run build', output directory 'public/build'
D. Connect GitHub repo, no build command, output directory 'public'
Solution
Step 1: Understand Vercel deployment with GitHub
Connecting GitHub repo enables automatic rebuilds on push. The build command must create production files.
Step 2: Identify correct build command and output folder
'npm run build' builds the app. To serve from 'public' folder as required, output directory must be 'public'.
Final Answer:
Connect GitHub repo, set build command 'npm run build', output directory 'public' -> Option A