When using r.js to package multiple modules js, the alias of paths in main.js in the directory is invalid?

  node.js, question

main.js
clipboard.png

When using r.js to package main.js app.js aa.js in node environment, there was an error and the ap.js a.js could not be found.
As long as I change the dependent js file name in require back to [‘app’,’aa’] it will compress normally, but then the alias I set in require.config is meaningless.
Excuse me, what is this? Where’s the mistake?

When packing,r.jsI won’t check youmain.jsInside’sconfigYou should be usingr.jsWhen ordering, take thisconfigPass it to him.

You have to read this chapter first.Using the optimizer as a node module

Add:

图片描述

Write abuild.js, keep your various insideconfig, and then call ther.jsWhen using-o build.jsThe way, just pass the configuration in.

Finally, English is really not that difficult. Look carefully, I don’t believe you can’t understand a word. What does it mean to look it up in a dictionary?