Skip to content

Commit

Permalink
Set globalObject to "this" (from default: window) (#18)
Browse files Browse the repository at this point in the history
* revert: Switch libraryTarget from umd to commonjs2

This is not the proper way to add support for Node, this breaks web support

* Set global object to "this"

Fixes #14 while keeping web support
  • Loading branch information
feildmaster authored and santhoshtr committed Sep 14, 2019
1 parent 5cbfda3 commit 5c088a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports = {
output: {
library: 'Banana',
libraryExport: 'default',
libraryTarget: 'commonjs2',
libraryTarget: 'umd',
globalObject: 'this',
filename: 'banana-i18n.js',
path: path.resolve(__dirname, 'dist')
},
Expand Down

0 comments on commit 5c088a4

Please sign in to comment.