scalableminds / amd-optimize

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
MIT License
162 stars 29 forks source link

options.paths #30

Closed qingxiao closed 9 years ago

qingxiao commented 9 years ago

requirejs.config can be like this:

baseUrl:"js/lib", 
paths: {
                page: '../page'
            }

use module js/page/frame.js :

require(['page/frame']);

but in the amd-optiomize options.paths like that it can't run

Error: No file for module 'page/frame' found.

so , them can't user same config ? or I use it error way?

normanrz commented 9 years ago

Unfortunately, I haven't had time to implement prefix paths yet. So, you can't use the config this way for now.

atesgoral commented 9 years ago

@normanrz If it helps in any way, here's a path resolver in < 140 characters: https://gist.github.com/atesgoral/1005248 I might also cut a PR when I find the time to breathe...

normanrz commented 9 years ago

should've been fixed with #33 (0.4.2 on npm). maybe @qingxiao can confirm?