Open mix3d opened 7 years ago
Looks like the issue is that the optimizer isn't getting sent the mainConfigFile
parameter that points to your main.js
file with the paths config in it. Without that parameter, the optimizer doesn't read the config from the file it's processing, it just uses whatever config you pass to the plugin. Right now, that's just your siteRoot
config. I think the task should look something like this:
gulp.task('rqs', function () {
return gulp.src('assets/js/main.js')
.pipe(requirejsOptimize({
mainConfigFile: 'assets/js/main.js'
}))
.pipe(gulp.dest('dist'));
});
I could be setting this up wrong, but here is my issue:
I am noticing in the error log that it is looking for a file that doesn't exist.
Error: Error: ENOENT: no such file or directory, open 'path/to/project/assets/js/marionette.js'
In my main.js, I have Marionnette defined as such:
I looks like the plugin is skipping the config completely (the file should be
backbone.marionette.js
), since it is not looking in the /vendor/ folder nor is it looking for the right file name.Here is my simple gulp task:
Am I doing something wrong? Thanks!