BlackFriday 2024! 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 4 Question 27 Discussion

Actual exam question for Adobe's AD0-E720 exam
Question #: 27
Topic #: 4
[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:

German
28 days ago
Option B is the way to go, my friends. It's the only one that doesn't look like it was written by a mathematician on a caffeine binge.
upvoted 0 times
Eugene
8 days ago
I think Option B is the best one for aliasing URLs and third party libraries.
upvoted 0 times
...
Roxane
13 days ago
Yeah, Option B seems much cleaner and easier to understand.
upvoted 0 times
...
Gail
17 days ago
I agree, Option B is definitely the most readable choice.
upvoted 0 times
...
...
Alyssa
1 months ago
All these options look like they could work, but I'm going to go with Option B. It just seems the most straightforward and intuitive to me. Plus, who doesn't love a good ol' object literal, am I right?
upvoted 0 times
Moira
5 days ago
Yeah, I think Option B is the way to go too. Object literals are always a good choice.
upvoted 0 times
...
Devora
23 days ago
I agree, Option B does seem like the most straightforward choice.
upvoted 0 times
...
...
Antonio
2 months ago
Hold on, is this a trick question? I'm going with Option A because it's the only one that looks like it's actually written in JavaScript. The other options seem a bit too fancy for my taste.
upvoted 0 times
Clare
7 days ago
Yeah, Option A looks like the most reliable one for aliasing URLs and third party libraries.
upvoted 0 times
...
Salley
8 days ago
I agree, Option A seems like the most practical choice.
upvoted 0 times
...
Lauran
9 days ago
I think Option A is the way to go. It looks more straightforward.
upvoted 0 times
...
...
Audra
2 months ago
I'm not sure, but Option C also seems to have some potential for aliasing URLs and third party libraries. It's a tough choice.
upvoted 0 times
...
Cristen
2 months ago
I agree with Carmen, Option A looks like the most suitable configuration for aliasing URLs and third party libraries in require js-config.js file.
upvoted 0 times
...
Jess
2 months ago
Option C is definitely the way to go. I've used that approach in my previous projects and it's worked like a charm. Plus, it's easier to read and maintain.
upvoted 0 times
...
Mitzie
2 months ago
I think Option B is the correct configuration for aliasing URLs and third-party libraries in a require js-config.js file. It looks the most clean and organized to me.
upvoted 0 times
Halina
11 days ago
I see your point, but I still think Option B is the most organized configuration for aliasing URLs and third-party libraries.
upvoted 0 times
...
Jimmie
17 days ago
I prefer Option C because it looks more straightforward for aliasing URLs and third-party libraries.
upvoted 0 times
...
Virgina
19 days ago
I think Option A might also work well for aliasing URLs and third-party libraries.
upvoted 0 times
...
Casie
20 days ago
I agree, Option B seems like the best choice for aliasing URLs and third-party libraries.
upvoted 0 times
...
...
Carmen
2 months ago
I think the developer would use Option A because it seems to be related to aliasing URLs and third party libraries.
upvoted 0 times
...

Save Cancel