Closed mattahj closed 8 years ago
I know nothing about webpack so I am trustfully merging this request.
Thanks for your work :+1:
When loading through webpack I get the following error
Uncaught ReferenceError: PLAYGROUND is not defined at Object._typeof (playground.js:443) at webpack_require__ (bootstrap 5076f24…:19) at Object._typeof (Main.js:2) at webpack_require (bootstrap 5076f24…:19) at Object.
(main.min.js:14495) at webpack_require_ (bootstrap 5076f24…:19) at module.exports.ctor.super (bootstrap 5076f24…:65) at bootstrap 5076f24…:65
Looking at line 433
window.ease = ease;
})();
/* file: src/Playground.js */
PLAYGROUND = {};
function playground(args) {
return new PLAYGROUND.Application(args);
};
I'm new to ES6 but should it have a var
?
Is there a chance you are using some old build?
https://github.com/rezoner/playground/blob/master/build/playground.js#L492
In my package.json i'm using
...
dependencies: {
"playground.js":"*",
....
So I'm guessing someone needs to update it?
I got it to work eventually by installing babel use-strict disable plugin
When loading playground using webpack I was seeing the following error:
playground.js:499 Uncaught TypeError: Cannot set property 'MOBILE' of undefined
. I had a look at the source and it seems like it was because of this part:When loaded by webpack,
window.PLAYGROUND
!== the globalPLAYGROUND
variable added by the build script, so I updated the build script to initialise PLAYGROUND to an empty object and it seems to work fine with webpack now :)