adobe-webplatform / Snap.svg

The JavaScript library for modern SVG graphics.
http://snapsvg.io
Apache License 2.0
13.91k stars 1.15k forks source link

It always shows this error 'Cannot set property 'eve' of undefined' #634

Closed CherishLiuJunping closed 1 year ago

CherishLiuJunping commented 4 years ago

It always shows this error 'Cannot set property 'eve' of undefined' when I am running my project, after adding the following to my webpack config and ignoring eslint check: module: { rules: [ { test: require.resolve('snapsvg/dist/snap.svg.js'), use: 'imports-loader?this=>window,fix=>module.exports=0', }, ], }, resolve: { alias: { snapsvg: 'snapsvg/dist/snap.svg.js', }, },

Alex-Golovin commented 1 year ago

https://www.npmjs.com/package/snapsvg-cjs-ts

abid-mujtaba commented 1 year ago

Solved here: https://github.com/adobe-webplatform/Snap.svg/issues/639