Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack compatibility? #7

Closed
RanzQ opened this issue Aug 17, 2016 · 5 comments
Closed

Webpack compatibility? #7

RanzQ opened this issue Aug 17, 2016 · 5 comments

Comments

@RanzQ
Copy link

RanzQ commented Aug 17, 2016

Cool project! I guess it is meant to be used with browserify, so webpack has a problem with fs.readFileSync. Anyone knows a workaround?

@dy
Copy link
Owner

dy commented Aug 17, 2016

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.

@RanzQ
Copy link
Author

RanzQ commented Aug 18, 2016

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. :)

@RanzQ
Copy link
Author

RanzQ commented Aug 18, 2016

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: webpack/webpack#417 (comment)

And I found this: facebookarchive/flux#45 (comment)

So adding strictify to your package.json solved it (it adds 'use strict'; to every module):

  "browserify": {
    "transform": [
      "brfs",
      "strictify"
    ]
  },

@RanzQ
Copy link
Author

RanzQ commented Aug 18, 2016

#8

@dy
Copy link
Owner

dy commented Aug 19, 2016

I guess we found workaround.

@dy dy closed this as completed Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants