Following Kill CommonJS default export behaviour #2212, babel always exports a default to exports.default. This broke the module.exports = UserAgent; behavior after upgrading the babel version. This PR adds babel-plugin-add-module-exports so that imports should now work as import UserAgent from 'user-agents' and const UserAgent = require('user-agents').
Following Kill CommonJS default export behaviour #2212, babel always exports a default to
exports.default
. This broke themodule.exports = UserAgent;
behavior after upgrading the babel version. This PR adds babel-plugin-add-module-exports so that imports should now work asimport UserAgent from 'user-agents'
andconst UserAgent = require('user-agents')
.