Challenge - 5 Problems
Vue Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Vite's default production build output folder
Which folder does Vite use by default for its production build output?
Attempts:
2 left
💡 Hint
Think about the folder name you see after running the build command in Vite.
✗ Incorrect
Vite outputs production build files into the dist folder by default.
❓ component_behavior
intermediate2:00remaining
Behavior of hot module replacement (HMR) in Vue CLI vs Vite
Which statement correctly describes how hot module replacement (HMR) behaves differently between Vue CLI and Vite during development?
Attempts:
2 left
💡 Hint
Consider how Vite serves files during development compared to Vue CLI.
✗ Incorrect
Vite uses native ES modules in the browser for development, enabling faster HMR without rebundling. Vue CLI bundles code with webpack before serving, which is slower for HMR.
📝 Syntax
advanced2:00remaining
Correct command to create a new Vue 3 project using Vite
Which command correctly creates a new Vue 3 project using Vite with npm?
Attempts:
2 left
💡 Hint
Vite uses a special npm create command with a template option.
✗ Incorrect
The correct way to create a Vue 3 project with Vite is using npm create vite@latest my-vue-app -- --template vue. Other commands are either Vue CLI commands or invalid.
🔧 Debug
advanced2:00remaining
Error when running 'vue serve' in a Vite project
You run 'vue serve' inside a project created with Vite and get an error saying the command is not found. Why does this happen?
Attempts:
2 left
💡 Hint
Think about which tool provides the 'vue serve' command.
✗ Incorrect
'vue serve' is a command provided by Vue CLI's global tools and is not part of Vite. Vite uses 'vite' commands for serving projects.
❓ lifecycle
expert2:00remaining
How Vue CLI and Vite handle environment variables during build
Which statement correctly describes how Vue CLI and Vite handle environment variables during the build process?
Attempts:
2 left
💡 Hint
Look at the prefixes required by each tool for environment variables to be exposed.
✗ Incorrect
Vue CLI exposes environment variables that start with VUE_APP_. Vite exposes variables starting with VITE_. This prevents accidental exposure of sensitive data.