Bird
0
0

Which of the following is the correct way to specify a custom CDN URL for Remix static assets in the remix.config.js file?

easy📝 Syntax Q3 of 15
Remix - Performance
Which of the following is the correct way to specify a custom CDN URL for Remix static assets in the remix.config.js file?
ApublicPath: 'https://cdn.example.com/assets/'
BassetsBuildDirectory: 'https://cdn.example.com/assets'
CcdnUrl = 'https://cdn.example.com/assets/'
DstaticAssets: 'https://cdn.example.com/assets/'
Step-by-Step Solution
Solution:
  1. Step 1: Recall Remix config for CDN URLs

    Remix uses publicPath to set the base URL for assets.
  2. Step 2: Identify correct syntax

    Setting publicPath to the CDN URL tells Remix to prefix asset URLs accordingly.
  3. Final Answer:

    publicPath: 'https://cdn.example.com/assets/' -> Option A
  4. Quick Check:

    CDN URL config = publicPath [OK]
Quick Trick: Use publicPath to set CDN base URL in Remix config [OK]
Common Mistakes:
MISTAKES
  • Using assetsBuildDirectory for CDN URL
  • Assigning cdnUrl instead of publicPath
  • Using staticAssets which is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Remix Quizzes