Node.js require() vs RequireJS?

前端 未结 3 921
北海茫月
北海茫月 2021-02-04 19:38

Hello with RequireJS I can set a base path like this: base : \'./app/\' so when I am in ./app/foo/bar/ for example and I have a script where I use

3条回答
  •  Happy的楠姐
    2021-02-04 20:00

    --alias, -a    Register an alias with a colon separator: "to:from"
                 Example: --alias 'jquery:jquery-browserify'   
    

    You can register aliases with browserify, so that covers your renaming.

    As for your rooted absolute paths, that can't really be done. As mentioned modul8 has a namespacing mechanism to solve this.

    I would recommend you pong SubStack in #stackvm on freenode and ask him directly.

提交回复
热议问题