scalableminds / amd-optimize

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

Prefix paths are not resolving properly #46

Open simshaun opened 9 years ago

simshaun commented 9 years ago

Using Bower & RequireJS, I have the following directory structure:

vendor/
    flight/
        component.js
        ....
scripts/
    common.js  (RequireJS config)
    app/
        core/
            component_ui/
                nav_drawer.js

In scripts/app/core/component_ui/nav_drawer.js, I have define(['flight/component'.... Just using RequireJS, this works because in my RequireJS config I have:

baseUrl: '/scripts/',
paths: {
    'flight': '../vendor/flight',
    ....
}

When I use amd-optimize like so:

amdOptimize.src('app/core/boot/main', {
    baseUrl: 'scripts',
    configFile: 'scripts/common.js'
})

I get the error:

Error: No file for module 'app/core/vendor/flight/component' found.
rubenspgcavalcante commented 9 years ago

Same issue, amd-opt don't prepend the relative paths with the baseUrl. :/

AStoker commented 9 years ago

Similar issue here. Any work arounds?

atomdmac commented 9 years ago

+1

extractachris commented 9 years ago

+1

11joselu commented 8 years ago

+1