Right now pixi-legacy adds 370kb to my final bundle size. I use parcel with --experimental-scope-hoisting and the default babel config ( > 0.25% global usage).
I read #1283. They are talking about excluding parts like Interaction, filters, and other stuff. Is there any way to do this in v5 without forking PIXI?
My current setup:
import { Application } from 'pixi.js-legacy'
const pixi = new Application({
view: document.querySelector( '#pixi-canvas' ),
width: window.innerWidth,
height: window.innerHeight
})
There is a tool called http://pixijs.io/customize you can use this to build a custom bundle with only the things you need, it should help reduce the footprint of pixi.
I need to up my google game lol. I've looked at Pixijs.io for multiple hours and couldn't find anything.
Thanks for the link @bigtimebuddy this will definitely help. I'll leave this open for now till I actually tried this out.
There's another serious page people usually miss: https://github.com/pixijs/pixi.js/wiki/v5-Resources
Btw, we need to add customize there too...
Yeah, it鈥檚 not super well advertised so not surprised you missed it. If you find issues or bugs, or feature suggestions, please add them to https://GitHub.com/PixiJS/customize
I think we can use CDN and gzip.
@7oolss Its more about the user experience. If I can have a default setup for all my pixi related projects that always saves me 100kb per fresh build after 1.000.000 page visits I will save about 100gb of data. Thats a lot of money in terms of average data-plan cost. My website shouldn't be a donation to internet providers in the long run.
@7oolss Its more about the user experience. If I can have a default setup for all my pixi related projects that always saves me 100kb per fresh build after 1.000.000 page visits I will save about 100gb of data. Thats a lot of money in terms of average data-plan cost. My website shouldn't be a donation to internet providers in the long run.
Its gzipped and usually cached on client side, next requests will ask only about timestamp. That means 1m unique users in a month or two - that's very big number.
I'm accounting for caching not lasting longer then 14 days. Its also more figure of speech. Its just that I know i'll use PIXI for more projects. If I can save 100kb in every future project that will safe lots of data in the long run. And tbh there are projects I've touched that easy get over those numbers. Doesn't happen often but when it does it counts imo.
Gonna close this issue and re-open it if needed. Thanks for all the answers.
There is also a nice short read on how to handle this with webpack by Anatoly Voevodin https://medium.com/anvoevodin/how-to-set-up-pixijs-v5-project-with-npm-and-webpack-41c18942c88d