Closed RanzQ closed 8 years ago
I am not adept of webpack and I don't see simple workarounds. I guess including bundled w/browserify package is the simplest way for now, unless there is some fs transform for webpack, like brfs for browserify.
I tried to use webpack transforms with pixi.js too but ended up importing the bundled version. I'm not sure how common it is but would it be pointless to include the bundle in this repo? In a lib/
path for example.
UPDATE: Ok, there is a fix now for the problem I was having with pixi v4. So, I'll try with that ify-loader
first. :)
It works with the ify-loader
but with a caveat, devtool must be set to source-map
since eval throws a ReferenceError: Panel is not defined
.
I think this discussion is related: https://github.com/webpack/webpack/issues/417#issuecomment-52914271
And I found this: https://github.com/facebook/flux/issues/45#issuecomment-54552950
So adding strictify
to your package.json solved it (it adds 'use strict';
to every module):
"browserify": {
"transform": [
"brfs",
"strictify"
]
},
I guess we found workaround.
Cool project! I guess it is meant to be used with browserify, so webpack has a problem with
fs.readFileSync
. Anyone knows a workaround?