Skip to content

Commit

Permalink
Add a export default to the file that gets required by node
Browse files Browse the repository at this point in the history
 - Maintains compatibility with direct require('i18next') for plain EcmaScript
 - Adds support for a default import, which fixes the problem with the TypeScript types currently misrepresenting the actual code in a node / require() environment and thus making it usable again
  • Loading branch information
lenovouser committed Feb 13, 2019
1 parent 55bcc6d commit 014c009
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
@@ -1 +1,5 @@
module.exports = require('./dist/commonjs/index.js').default;
/* eslint no-var: 0 */
var main = require('./dist/commonjs/index.js').default;

module.exports = main;
module.exports.default = main;

0 comments on commit 014c009

Please sign in to comment.