Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E720 Topic 5 Question 36 Discussion

Actual exam question for Adobe's AD0-E720 exam
Question #: 36
Topic #: 5
[All AD0-E720 Questions]

An Adobe Commerce developer needs to alias URLs and third party libraries inside a require js-config.js file. Which configuration would the developer use?

A)

B)

C)

Show Suggested Answer Hide Answer
Suggested Answer: B

To alias URLs and third party libraries inside a requirejs-config.js file, the developer should use the paths configuration option. This option allows the developer to map module names to URLs or paths relative to the baseUrl. For example:

var config = { paths: { 'jquery': 'https://code.jquery.com/jquery-3.6.0.min', 'custom': 'Vendor_Module/js/custom' } };

This will map the module name 'jquery' to the URL of the jQuery library and the module name 'custom' to the path of the custom module. The developer can then use these module names in other modules or files without specifying the full URL or path.

Option A is not correct because it uses the shim configuration option, which is used to define dependencies and exports for non-AMD modules, not to alias URLs or paths. Option C is not correct because it uses the map configuration option, which is used to map module names to other module names for specific contexts, not to alias URLs or paths. Reference: [RequireJS configuration], [RequireJS paths]


Contribute your Thoughts:

Lynsey
26 days ago
I'm all about efficiency, so I'm picking Option B. Alias URLs and libraries? That's my kind of coding magic!
upvoted 0 times
Pansy
12 hours ago
User 2: Definitely, aliasing URLs and libraries is key for smooth development.
upvoted 0 times
...
Daniel
8 days ago
User 1: I agree, Option B seems like the most efficient choice.
upvoted 0 times
...
...
Lelia
1 months ago
Option A looks a bit too generic. I think Option C is the way to go. Gotta love those RequireJS configurations!
upvoted 0 times
Galen
19 days ago
Yeah, Option C looks like it provides the specific configurations needed for the require js-config.js file.
upvoted 0 times
...
Norah
22 days ago
I agree, Option C seems like the best choice for aliasing URLs and third party libraries.
upvoted 0 times
...
...
Dottie
1 months ago
I'm going with Option B. It's the only one that specifically mentions 'paths' and 'shims', which seem relevant to the question.
upvoted 0 times
...
Emiko
1 months ago
Option C looks like the right choice here. Aliasing URLs and third-party libraries in the require js-config.js file is exactly what the question is asking for.
upvoted 0 times
Walker
6 days ago
I'm not sure, but Option B could also be a good option for the require js-config.js file.
upvoted 0 times
...
Lura
17 days ago
I agree, Option C is the best one for aliasing URLs and third-party libraries.
upvoted 0 times
...
Rosalind
17 days ago
I think Option A might work too, it seems like a valid choice.
upvoted 0 times
...
...
Adolph
2 months ago
But Option A provides a more efficient way to alias URLs and third party libraries.
upvoted 0 times
...
Daren
2 months ago
I disagree, I believe Option B is the correct configuration.
upvoted 0 times
...
Adolph
2 months ago
I think the developer should use Option A.
upvoted 0 times
...

Save Cancel