0
0
Svelteframework~10 mins

Static adapter deployment in Svelte - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the static adapter in SvelteKit.

Svelte
import adapter from '@sveltejs/adapter-[1]';
Drag options to blanks, or click blank then click option'
Avercel
Bnode
Cstatic
Dnetlify
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'node' adapter instead of 'static'.
Misspelling the adapter name.
2fill in blank
medium

Complete the adapter configuration in svelte.config.js for static deployment.

Svelte
export default {
  kit: {
    adapter: adapter({ [1]: 'build' })
  }
};
Drag options to blanks, or click blank then click option'
Apages
Btarget
Cassets
Dout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'target' instead of 'pages'.
Omitting the adapter configuration.
3fill in blank
hard

Fix the error in the build script to deploy a static site.

Svelte
"scripts": {
  "build": "svelte-kit [1]"
}
Drag options to blanks, or click blank then click option'
Adev
Bbuild
Cpreview
Dadapter-static
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'preview' or 'dev' instead of 'build'.
Adding adapter name in the script command.
4fill in blank
hard

Fill both blanks to configure the static adapter with custom folders.

Svelte
adapter: adapter({
  [1]: 'public',
  [2]: 'assets'
})
Drag options to blanks, or click blank then click option'
Apages
Btarget
Cassets
Dfiles
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'target' with 'pages'.
Using 'files' instead of 'assets'.
5fill in blank
hard

Fill all three blanks to complete the svelte.config.js static adapter setup.

Svelte
import adapter from '@sveltejs/adapter-[1]';

export default {
  kit: {
    adapter: adapter({
      [2]: 'build',
      [3]: 'static'
    })
  }
};
Drag options to blanks, or click blank then click option'
Astatic
Bpages
Cassets
Dnode
Attempts:
3 left
💡 Hint
Common Mistakes
Importing wrong adapter like 'node'.
Mixing up 'pages' and 'assets' keys.