Giter Site home page Giter Site logo

Comments (4)

rschristian avatar rschristian commented on June 9, 2024 1

To compare, you should look directly at the bundles (rather than directory). This means bundle.<hash>.js w/ JS vs bundle.<hash>.js w/ TS, and so on. First narrow down what specifically has changed; as you're only looking at raw directory size, for all we know, you might've made a typo in an import statement and now there's an extra copy of an image or something.

For analyzing bundles, there is the --analyze flag on preact build, which you can use to get an idea of the makeup of your bundles. If a JS bundle did increase after the conversion, you can use that to figure out what's changed (besides doing a direct text comparison, which can obviously be a tedious process in large bundles).

from preact-cli.

rschristian avatar rschristian commented on June 9, 2024

Please don't use raw directory size as a source of comparison; that is not a sound way to compare JS bundles.

Creating a new JS & TS Preact-CLI app shows a difference of ≈0.003% between the output bundles, which is to be expected. But to test anything besides the bare templates, I need a minimal reproduction.

I'll be honest here: asking maintainers to look through a full app containing dozens of libraries and a +3308, -2030 diff for a perceived bug is being incredibly disrespectful of our time. You need to invest some time narrowing the (perceived) bug down before you ask other people to investigate it for you. I'd be more than happy to help at that point.

I can reopen if you provide a minimal reproduction.

from preact-cli.

selankon avatar selankon commented on June 9, 2024

Ok thanks for your comment, I will investigate further before post anything. Could you recommend me a better way to analyze the production build size?

Thanks for your job

from preact-cli.

selankon avatar selankon commented on June 9, 2024

Just FYI, thi bundle size increased from 424K to 568K. I have to research why, but probably not related to preact. See

from preact-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.