-1

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

pevgeniev
  • 389
  • 2
  • 13
  • Why do you want to exclude anything from the bundle? – Dziamid Dec 16 '14 at 15:32
  • Because it's not a functionality that is used very often. I prefer to load it on demand, than to increase the initial load time. – pevgeniev Dec 16 '14 at 18:16
  • Why don't you try to create a separate requirejs bundle then? [See](http://stackoverflow.com/questions/25175914/bundles-in-requirejs) – Dziamid Dec 17 '14 at 22:11

1 Answers1

0

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:"
}