Exclude shim from require js optimized build

337 views Asked by At

I've a durandal WebApp which uses require js to load modules. There's a shim configured for tinymce. It works OK when using the non-optimized version. When I use r.js to optimize the code, I want to exclude tinymce from the bundle, but it's always included. Does anyone know how to exclude the shims from being included in the optimized build? I'm using gulp-durandal, and I've successfully excluded other modules, using the excludeShadow setting, but it doesn't seam to work for shims, or I'm doing something wrong.

EDIT: I managed to fix the problem by manually setting in the gulp-durandal file the exclude array in rjsConfigAdapter. For some reason the moduleFilter function didn't excluded the files, but the exclude array did the job

1

There are 1 answers

0
Seva Arkhangelskiy On

Try something like paths.tinymce=empty: in your r.js command line call.

Or this (in your require config), if you use it via Grunt.js or something:

paths: {
    tinymce: "empty:"
}