Uncaught TypeError: Cannot read property 'name' of undefined
at new s (main.js:206)
at Module.<anonymous> (main.js:206)
at n (main.js:1)
at main.js:1
at main.js:1
After some further debugging and setting a breakpoint in the main.js at the line const i = new r; you can clearly see that the r variable only has the saveAs function. All the other functions are missing.
It can be reproduced with the following configuration:
Webpack allows to disable AMD parsing - for a good reason - with the following option: https://webpack.js.org/configuration/other-options/#amd. But when the AMD parser is disabled, it gives the following error:
After some further debugging and setting a breakpoint in the
main.js
at the lineconst i = new r;
you can clearly see that ther
variable only has thesaveAs
function. All the other functions are missing.It can be reproduced with the following configuration:
package.json
:webpack.config.js
:app.js
index.html
Using
or
doesn't change anything.
However it works when using
But it feels wrong using the node version to fix this issue. In my opinion it should work with disabled AMD parser and importing it like: