mirror of
https://github.com/axios/axios.git
synced 2026-04-11 02:11:50 +08:00
Add globalObject: 'this' to webpack config (#3176)
This should solve the issue of undefined `this` when importing from an ES6 module. I've put steps to reproduce in [this comment](https://github.com/axios/axios/issues/1861#issuecomment-669832435). Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
parent
f3ca6371ca
commit
e52cd3ac64
@ -11,7 +11,8 @@ function generateConfig(name) {
|
||||
filename: name + '.js',
|
||||
sourceMapFilename: name + '.map',
|
||||
library: 'axios',
|
||||
libraryTarget: 'umd'
|
||||
libraryTarget: 'umd',
|
||||
globalObject: 'this'
|
||||
},
|
||||
node: {
|
||||
process: false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user