Exclude plugins in Aurelia

Hello everybody

Is it possible to Exclude plugins in Aurelia?

eg: I add

aurelia.plugin(PLATFORM.moduleName('aurelia-toolbelt')); // Whole package

and then exclude

aurelia.EXCLUDEplugin(PLATFORM.moduleName('aurelia-toolbelt/components/bootstrap/button')); // I dont need this

Sometimes excluding some plugins from a full package is easier than adding many of them one by one!!!

Any solution?

I don’t believe so. In a custom bundling script you could use bundling arithmetic to get a bundle to contain what you want, but I don’t think you’ll ever be able to import it referencing ‘aurelia-toolbelt’ directly. You probably could create a ‘my-aurelia-toolbelt’ module that imports and reexports exactly what you want from aurelia-toolbelt. That’s the best I can think of.

1 Like