Skip to content

Commit

Permalink
Illustrates issue with importing PIXI on client.
Browse files Browse the repository at this point in the history
Maybe related issues with PIXI through Webpack

pixijs/pixijs#1854
pixijs/pixijs#2078

Where they set

node: {
    fs: "empty"
}
  • Loading branch information
jiku committed Jan 20, 2016
1 parent 2ed9c08 commit 9b0615d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
15 changes: 15 additions & 0 deletions tools/tests/apps/modules/README.md
Expand Up @@ -8,3 +8,18 @@ npm test # just does `meteor run`
```

then visit [localhost:3000](//localhost:3000) in your browser.

### jiku

Maybe related issues with PIXI through Webpack

[1](https://github.com/pixijs/pixi.js/issues/1854)
[2](https://github.com/pixijs/pixi.js/issues/2078)

Where they set

```javascript
node: {
fs: "empty"
}
```
3 changes: 2 additions & 1 deletion tools/tests/apps/modules/package.json
Expand Up @@ -5,7 +5,8 @@
"private": true,
"dependencies": {
"moment": "2.11.1",
"regenerator": "^0.8.42"
"regenerator": "^0.8.42",
"pixi.js": "^3.0.9"
},
"scripts": {
"test": "../../../../meteor run"
Expand Down
8 changes: 8 additions & 0 deletions tools/tests/apps/modules/tests.js
Expand Up @@ -194,3 +194,11 @@ describe("Meteor packages", () => {
assert.strictEqual(mtp.where, Meteor.isServer ? "server" : "client");
});
});

describe("PixiJS", () => {
Meteor.isClient &&
it("should be importable on the client", () => {
import PIXI from "pixi.js";
assert.strictEqual(require("PIXI"), PIXI);
});
});

0 comments on commit 9b0615d

Please sign in to comment.