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

Re : Multiple Steal plugins in one?

$
0
0
I'm not sure how I'd get it to work without  require(), though, since we need:
  1. exports.instantiate = require("$less").instantiate;
System.import("$less").then() wouldn't get the value to  exports in time. I tried returning a promise, but it errors.

Edit: This works in dev:
  1. exports.instantiate = function(load)  {
  2.   return new Promise( function(resolve, reject)  {
  3.     System.import("$css").then( function(css)  {
  4.       resolve( css.instantiate(load) );
  5.     });
  6.   });
  7. };

When building, however, it just shows:
 OPENING: main
then exits.

Viewing all articles
Browse latest Browse all 3491

Trending Articles