Closed 243083df closed 1 year ago
mh, can you point me which file you mean? The polyfill itself?
the main file is quite alright, or not? https://unpkg.com/browse/odata@1.3.1/dist/umd/
File size is ok, but probles is that this is not all code, since it contains require("universal-url")
and another requires.
And when webpack try to build bundle, it connect every require with package including universal-url with tr46
I see. Didn't think of webpack.
I guess I need to place everything inside o.polyfill.ts
.
The require calls are there to make it work in node.js if fetch or URL is not present. As said, did not think about webpack.
Just checked out this: https://stackoverflow.com/questions/34828722/how-can-i-make-webpack-skip-a-require
Maybe it is worth a try to use window.require
?
could you try this one if the require() calls are still picked up by webpack? https://www.npmjs.com/package/o.js/v/1.4.0-rc0
Still picked up :C
Seems like url-polyfill must be used instead.