Code Monkey home page Code Monkey logo

Comments (12)

ai avatar ai commented on July 24, 2024 1

Sad news, Size Limit works good on AppVeyor https://ci.appveyor.com/project/ai/size-limit

from size-limit.

swernerx avatar swernerx commented on July 24, 2024

What actually confuses me is that it worked in the last iteration. Maybe it's an appveyor specific issue.

See the log:
https://ci.appveyor.com/project/swernerx/edge-core/build/108/job/5me5g2tkg7nmvyh0

from size-limit.

ai avatar ai commented on July 24, 2024

I think we should run Size Limit tests on AppVeyor too. Wait for a second, I create the project there.

from size-limit.

ai avatar ai commented on July 24, 2024

Are you sure, that it is not from prepublish command?

from size-limit.

ai avatar ai commented on July 24, 2024

I released 0.8.3 with better error messages. Could you test again with it?

from size-limit.

swernerx avatar swernerx commented on July 24, 2024

Still seems to be broken for me. Node v6 only BTW: https://travis-ci.org/sebastian-software/edge-core/jobs/263067471

from size-limit.

swernerx avatar swernerx commented on July 24, 2024

That's probably a difference :) You are currently only testing on v8.

from size-limit.

ai avatar ai commented on July 24, 2024

Still good on Node.js 6 too https://ci.appveyor.com/project/ai/size-limit

from size-limit.

ai avatar ai commented on July 24, 2024

BTW, I think I found what it is the problem. It is not related with Windows.

When somebody will build your project with Webpack, it will not have fs because of fs available only in Node.js, not in the browser. So you must add this lines to your package.json:

https://github.com/postcss/postcss/blob/45cf0a172b6720505be9da0dde78a54138e2cc13/package.json#L71-L73

from size-limit.

swernerx avatar swernerx commented on July 24, 2024

Thanks for the hint with the "browser" config. Actually it should never hit this as there are two different output scenarios for the library "web" and "node". These are the entries in the package.json:

  "main": "lib/node.es5.cjs.js",
  "module": "lib/node.es5.esm.js",
  "browser": "lib/browser.es5.esm.js",

Which entry is size-limit using? Because the "browser" entry point is not accessing any fs at all.

from size-limit.

ai avatar ai commented on July 24, 2024

Size Limit take file from size-limit section and pack it with webpack. As result because of this section:

    {
      "path": "lib/node.es5.esm.js",
      "limit": "1000 KB"
    }

It will take lib/node.es5.esm.js and will try to pack it in webpack and will have issue (because packing is impossible).

In your case there is no big sense to test lib/node.es5.esm.js size, since it doesnโ€™t go to browser and size is not critical.

from size-limit.

swernerx avatar swernerx commented on July 24, 2024

That's the issue. You are absolutely right. Thanks!

from size-limit.

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.