Pixi.js: Custom pixi build doesn't exclude modules?

Created on 19 Nov 2016  路  4Comments  路  Source: pixijs/pixi.js

I tried several times now to do a custom build of the pixi lib to optimize the filesize of the lib in a project. For some reason everytime it's building the full lib (including all modules), even though I have the -e or --exclude parameters added to the npm run build command (and I see it passing through to pixify etc.).

This is what I did so far (following the instructions on the Pixi Github page):

  • downloading and unzipping the full pixi zip file (v4.2.2)
  • in the root of the pixi folder: npm install (creating node modules folder)
  • in the root of the pixi folder: npm run build -- -e extras -e interaction -e filters (also tried: npm run build -- --exclude extras --exclude interaction --exclude filters)

It's building the pixi.js and pixi.min.js files, but it's not excluding the modules mentioned.

I'm trying to figure out why this isn't working for me. Because I see the exclude parameters are passing through to pixify etc. I begin to wonder if I'm missing something or this exclude functionality isn't working anymore. btw I upgraded nodeJs to version 6.9.1 some days ago, so that should be ok.

I'm not an expert on npm / build, but I followed the instructions on the pixi github page to create a custom build and it's not throwing errors while the result is not right. Am I missing something here? Or could this be an issue in the build system or perhaps outdated instructions?

Most helpful comment

Will do!

All 4 comments

Oops, the command changed slightly in the latest release. npm run dist -- -e filters is what you want, noticed the dist instead of build. We slightly changed the build process in 4.2.x to allow for unbundled source.

Thanks for your quick reaction @bigtimebuddy. That did it! Perhaps you could also change the instructions in the readme on github. I'm glad it works now :)

Will do!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Darker picture Darker  路  3Comments

st3v0 picture st3v0  路  3Comments

zcr1 picture zcr1  路  3Comments

finscn picture finscn  路  3Comments

readygosports picture readygosports  路  3Comments