diff --git a/lib/index.js b/lib/index.js index 4b4719a16f..17897f8ee7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,3 +16,6 @@ function createApplication () { createApplication.version = version; module.exports = createApplication; + +// For better ES module (TypeScript) compatibility +module.exports.default = createApplication; diff --git a/test/application.test.js b/test/application.test.js index e37b304642..5a9cf66dc5 100644 --- a/test/application.test.js +++ b/test/application.test.js @@ -3,6 +3,10 @@ const Proto = require('uberproto'); const feathers = require('../lib'); describe('Feathers application', () => { + it('adds an ES module `default` export', () => { + assert.equal(feathers, feathers.default); + }); + it('initializes', () => { const app = feathers();