Git Product home page Git Product logo

Comments (8)

NeoLegends avatar NeoLegends commented on May 20, 2024

Splitting off a separate package shouldn't be necessary for this. Just importing the withFit-mixin directly will be enough. :)

We never import redux directly in any of the mixins (just the TS types) nvm I forgot bindActionCreators, but that's in connect, not in withFit. :)

from fit-html.

harryfei avatar harryfei commented on May 20, 2024

Ok, I got it. That's cool.

from fit-html.

harryfei avatar harryfei commented on May 20, 2024

BTW, is 3Kb still correct now? I just get a 20Kb bundle file(fit-html, lit-html, and redux) and an 8Kb compressed file. @NeoLegends

from fit-html.

NeoLegends avatar NeoLegends commented on May 20, 2024

BTW, is 3Kb still correct now? I just get a 20Kb bundle file(fit-html, lit-html, and redux) and an 8Kb compressed file. @NeoLegends

3k was always minzipped size, but that sounds a little large, tbh. fit-html hasn't changed in size very much lately, but lit-html and maybe redux have. How many components are there in your bundle? You may underestimate the size of the template strings. Also, are you using a tree-shaking bundler (webpack 2, rollup)?

from fit-html.

harryfei avatar harryfei commented on May 20, 2024

Yeah, I check the bundle file, it's not fit-html's fault. lit-html increase a lot during recent versions.

from fit-html.

NeoLegends avatar NeoLegends commented on May 20, 2024

Great! Mind sharing the stats? Iā€˜d be interested in how large lit-html has become by now. :)

from fit-html.

harryfei avatar harryfei commented on May 20, 2024

I write the index.ts and import lit-html (v0.10), use rollup to build bundle.

import { html } from 'lit-html/lib/lit-extended';
console.log(html)

minized size: 5.2Kb
minized and gizped size: 1.9Kb

from fit-html.

NeoLegends avatar NeoLegends commented on May 20, 2024

I'm afraid you're missing the render from lit-html to get more accurate stats about the size. Right now you're just importing the tag, but no render functionality.

from fit-html.

Related Issues (7)

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.