Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Systemjs plugin with instantiate without inclusion in build

$
0
0
I want to load some type of file dynamically excute some action but include it in build.


  1. exports.instantiate = function(load) {
  2.     load.metadata.deps = [];

  3.     load.metadata.execute = function(){

  4.         if(load.source) {
  5.             /// some action here
  6.         }
  7.         return System.newModule({});
  8.     };
  9.     load.metadata.format = "some";
  10. };
Why build I've got:

ERROR: undefined undefined
Potentially unhandled rejection [30] transpile - unable to transpile some to amd (WARNING: non-Error used)
Process finished with exit code 0

How to exclude this type of file from build process? (but load it dynamically in production)

Viewing all articles
Browse latest Browse all 3491

Trending Articles