javascript,angularjs,ecmascript-6,es6-module-loader
ES6 imports are hoisted to the top of the file, so you cannot rely on ordering like this. The core of the issue for you is that you're relying on a implicit dependency (app) that isn't defined anywhere. Explicitly importing app would ensure that you actually get things in order....
javascript,requirejs,ecmascript-6,commonjs,es6-module-loader
SystemJS can load es6 modules and AMD or CommonJS together. It has format detector, so you can just import module via System.import, and then library takes care about module formats...
javascript,ecmascript-6,webpack,es6-module-loader
Shimming modules is the way to go: http://webpack.github.io/docs/shimming-modules.html I quote from the page: plugin ProvidePlugin This plugin makes a module available as variable in every module. The module is required only if you use the variable. Example: Make $ and jQuery available in every module without writing require("jquery"). new webpack.ProvidePlugin({...
javascript,angularjs,karma-runner,es6-module-loader
The solution I ended up finding involved using karma-systemjs. Include all your tests files on the systemjs/files section: systemjs: { files: [ // TEST FILES ], configFile: 'system.config.js', config: { paths: { 'angular-mocks': 'node_modules/angular-mocks/angular-mocks.js' } } } And on the tests instead of using: System.import('boot'); Use: 'use strict'; import 'angular-mocks';...