amd-optimize icon indicating copy to clipboard operation
amd-optimize copied to clipboard

Prefix paths are not resolving properly

Open simshaun opened this issue 10 years ago • 5 comments

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.

simshaun avatar Mar 10 '15 03:03 simshaun

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

rubenspgcavalcante avatar Mar 10 '15 13:03 rubenspgcavalcante

Similar issue here. Any work arounds?

AStoker avatar Jul 17 '15 13:07 AStoker

+1

atomdmac avatar Aug 23 '15 15:08 atomdmac

+1

extractachris avatar Sep 04 '15 22:09 extractachris

+1

11joselu avatar Mar 23 '16 11:03 11joselu