Ember-auto-import 1.0 released

I was able to see some of the culprits because the auto importer choked on a css file in one of our deps, but that debug tool is going to be helpful as well.

Some of the increase made sense as we are explicitly importing slim builds of certain deps which the auto importer wouldn’t be aware of. I’ll try to dig in to the others.

In addition to broccoli-debug, we have regular debug logging too:

DEBUG=ember-auto-import:* ember build

That will print a lot of detail about which imports we are discovering and ultimately packaging. Some of the most interesting bits are the lists of modules we are bundling:

ember-auto-import:bundler building app bundle with dependencies: ["inner-lib2/named","lodash-es","inner-lib","inner-lib2"] +0ms

And at the next level of detail, the set of individual entrypoints we’re using for each module:

ember-auto-import:splitter output {"app":{"inner-lib2/named":{"entrypoint":"/Users/edward/hacking/ember-auto-import/test-apps/inner-lib2/named.js"},"lodash-es":{"entrypoint":"/Users/edward/hacking/ember-auto-import/node_modules/lodash-es/lodash.js"},"inner-lib":{"entrypoint":"/Users/edward/hacking/ember-auto-import/test-apps/inner-lib/index.js"},"inner-lib2":{"entrypoint":"/Users/edward/hacking/ember-auto-import/test-apps/inner-lib2/index.js"}},"tests":{}} +0ms

Which if you pretty-print it contains this info:

{
   "tests" : {},
   "app" : {
      "inner-lib2" : {
         "entrypoint" : "/Users/edward/hacking/ember-auto-import/test-apps/inner-lib2/index.js"
      },
      "inner-lib" : {
         "entrypoint" : "/Users/edward/hacking/ember-auto-import/test-apps/inner-lib/index.js"
      },
      "lodash-es" : {
         "entrypoint" : "/Users/edward/hacking/ember-auto-import/node_modules/lodash-es/lodash.js"
      },
      "inner-lib2/named" : {
         "entrypoint" : "/Users/edward/hacking/ember-auto-import/test-apps/inner-lib2/named.js"
      }
   }
}
2 Likes