question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Any way to decrease PIXI-legacy's final bundle size < 370kb?

See original GitHub issue

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
        })

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
bigtimebuddycommented, Feb 12, 2020

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.

1reaction
UltraCakeBakerycommented, Feb 14, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Any way to decrease PIXI-legacy's final bundle size < 370kb?
I use parcel with --experimental-scope-hoisting and the default babel config ( > 0.25% global usage). I read #1283. They are talking about ...
Read more >
5 Methods to Reduce JavaScript Bundle Size - Bits and Pieces
In this article, I will discuss 5 techniques to reduce the JavaScript bundle size to avoid any performance bottlenecks.
Read more >
3 ways to reduce webpack bundle size - Jakob Lind
Easy: Run webpack in production mode · Enable minification using TerserPlugin. It removes unnecessary white spaces, new lines, unreachable code, etc. · Set...
Read more >
Possible ways to reduce your webpack bundle size - Medium
USE WEBPACK 4 IN PRODUCTION. This is really important because using webpack 4 in production automatically removes all unnecessary white spaces, ...
Read more >
Slimming down your bundle size - LogRocket Blog
A critical part for improving frontend performance is to reduce the JavaScript bundle size that should be downloaded via the network.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found