scalableminds / amd-optimize

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

It always be wrong when I use amd-optimize like this.i'm really confused #75

Open kuangrs opened 7 years ago

kuangrs commented 7 years ago

project structure image

gulfile.js

gulp.task('base', function () {
    return amdOptimize.src('./js/init')
    .pipe(concat('base.js'))
    .pipe(gulpif(con, uglify()))
    .pipe(gulp.dest('./js/dist'));
});

./js/init.js

require.config({
    "paths": {
        'Datepicker':'modules/datepicker',
    'PopUpBox':'modules/popupbox'
    }
});

require(['Datepicker', 'PopUpBox'], function(){
    console.log('hello');
});

wrong message when executing gulpfile.js image