pixi-viewport icon indicating copy to clipboard operation
pixi-viewport copied to clipboard

IE11

Open mnovbaalen opened this issue 5 years ago • 4 comments

I want to use pixi-viewport in a project that is being used by a significant share of internet explorer 11 users.

I can not manage to get pixi-viewport working in IE11. I use pixi.js-legacy 5.1.5, pixi-viewport 4.3.3 in a webpack / typescript setup. But I have also tried all sorts of other things like manually transpile via https://babeljs.io/ Whatever I try, the transpiled pixi-viewport code keeps having class definitions in it whch is not supported.

The examples also do not work in IE11: (https://davidfig.github.io/pixi-viewport/ and https://davidfig.github.io/pixi-viewport/builds/)

Does anyone know or have a working example for pixi-viewport in IE11?

mnovbaalen avatar Nov 18 '19 09:11 mnovbaalen

You need babel to compile your node_modules files. Here are some discussions:

https://stackoverflow.com/questions/54043498/how-to-transpile-node-modules-modules-with-babel-loader

https://stackoverflow.com/questions/51289261/babel-does-not-transpile-imported-modules-from-node-modules

davidfig avatar Nov 19 '19 01:11 davidfig

Thank you for your quick response. I'm gonna give that a try and I will share my findings.

mnovbaalen avatar Nov 19 '19 12:11 mnovbaalen

I'm very sorry for the late reply, but I can confirm that it is working now, using babel. This is the part of my webpack.config.js that handles .js files:

{ test: /\.js$/, exclude: /node_modules\/(?!(pixi-viewport)\/).*/, loader: 'babel-loader', },

mnovbaalen avatar Jan 08 '20 08:01 mnovbaalen

Im currently having the same issue in my project. I'm using i've put the following in my tsconfig but i still keep getting a Syntax Error on the InputManager.

"exclude": [ "node_modules\/(?!(pixi-viewport)\/).*", "tests/**/*", "coverage/**/*", ]

Any help would be very appreciated

c-andrews avatar Feb 17 '20 10:02 c-andrews