ashmore11 Posted February 18, 2019 Share Posted February 18, 2019 Hey guys! I need to have my site working in Safari 9 and IE11 but I've noticed that there is ES6 code in the pixi.js bundle. Has anybody else encountered this? Looks like it's coming from the mini-signals dependency. I have tried adding pixi.js and mini-signals to my include config for babel-loader but it's still not being transpiled. Any ideas of a solution? ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 18, 2019 Share Posted February 18, 2019 https://pixijs.download/dev/pixi.js which line is it? Do you use stuff from `dist` directory of npm package or from `lib` ? `lib` contains ES6 bundle. Quote Link to comment Share on other sites More sharing options...
ashmore11 Posted February 18, 2019 Author Share Posted February 18, 2019 In my project I am importing pixi as: import * as PIXI from 'pixi.js'; Should I be doing it differently to get non ES6? The only ES6 code is coming from the mini-signals dependency in pixi. There is no ES6 code anywhere else within the pixi.js bundle. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted February 18, 2019 Share Posted February 18, 2019 How are you bundling? https://github.com/Hypercubed/mini-signals/blob/master/package.json#L6 mini-signals exposes ES6 modules. Parcel uses these as standard, Webpack might also use that. Might want to make sure your bundler is configured correctly, I looked through the link Ivan posted above and it all looks ES5 compliant in there so Pixi's rollup (which usually honours jsnext:main) doesn't look like the culprit. I suspect it could be due to your app bundler pulling mini-signals from node_modules. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ashmore11 Posted February 19, 2019 Author Share Posted February 19, 2019 You're probably right @mattstyles but even adding mini-signals to my include array still doesn't transpile it. For now I got it working by using the cdn versions of pixi. I'll keep digging for a better solution though. Thanks guys! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.