Browse Source

Introduce lazypack, fix node builds using it.

Herbert Vojčík 7 years ago
parent
commit
e0167a4730
2 changed files with 6 additions and 2 deletions
  1. 2 2
      Gruntfile.js
  2. 4 0
      support/lazypack.js

+ 2 - 2
Gruntfile.js

@@ -85,7 +85,7 @@ module.exports = function (grunt) {
                     pragmas: {
                         // none, for repl to have all info
                     },
-                    include: ['config-node', 'app'],
+                    include: ['config-node', 'app', 'amber/lazypack'],
                     insertRequire: ['app'],
                     optimize: "none",
                     wrap: helpers.nodeWrapperWithShebang,
@@ -108,7 +108,7 @@ module.exports = function (grunt) {
                     pragmas: {
                         // none, amber tests test contexts as well as eg. class copying which needs sources
                     },
-                    include: ['config-node', 'app'],
+                    include: ['config-node', 'app', 'amber/lazypack'],
                     insertRequire: ['app'],
                     optimize: "none",
                     wrap: helpers.nodeWrapperWithShebang,

+ 4 - 0
support/lazypack.js

@@ -0,0 +1,4 @@
+// Depend on each module that is loaded lazily.
+// Add to packager tasks as dependency,
+// so the lazy-loaded modules are included.
+define(['./kernel-runtime'], {});