2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +03: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:
Paweł Szymański
2021-09-16 21:08:40 +02:00
committed by GitHub
parent f3ca6371ca
commit e52cd3ac64
+2 -1
View File
@@ -11,7 +11,8 @@ function generateConfig(name) {
filename: name + '.js',
sourceMapFilename: name + '.map',
library: 'axios',
libraryTarget: 'umd'
libraryTarget: 'umd',
globalObject: 'this'
},
node: {
process: false