avoidwork/filesize.js

Changelog for the major update

SayakMukhopadhyay opened this issue ยท 11 comments

I just noticed that the library has had a major update. Has there been any breaking changes? A changelog would be nice so that I can determine the changes required on my end.

What changed was the deprecated 'suffixes' option was removed after a year+ of having that status; see a0b268f

Thanks for the info. Appreciate it!

Same question for 5.0

@Hypnosphi if you can post this comment, you can look at the commit log just under "Issues" in the main repo view. I'm not going to spend my time on stuff when the commit total is under 500, because ... this repo is 8 years old with under 250* commits... you can easily determine the difference.

to expand on this... if you really want the changelog, open the PR with the code that'll generate it; you want it, not me, and you can land that feature anytime you want to create it.

One thing that I didn't find out looking at the commits is the fact that starting from 5.0, you have to transpile filesize library with babel if you need IE 11 support.

Correct; I don't support IE11 in my work or play. It's time has passed.

i can make the absent 4.x branches if that'd help with a maintenance concern

One thing that I didn't find out looking at the commits is the fact that starting from 5.0, you have to transpile filesize library with babel if you need IE 11 support.

@Hypnosphi

Don't suppose you have any pointers/reference/example for this? I tried specifying node_modules/filesize in webpack config for babel-loader to no avail.

@dmison how exactly did you try to do this? In my case, it's a separate babel-loader rule with {modules: 'commonjs'}:

{
  test: /\.js$/,
  include: /node_modules\/filesize\//,
  use: [
    {
      loader: 'babel-loader',
      options: {
        cacheDirectory: true,
        babelrc: false,
        presets: [
          [
            '@babel/preset-env',
            {
              modules: 'commonjs',
            },
          ],
        ],
      },
    },
  ],
}

I just added the include line to our existing babel-loader config. Didn't even occur to me to add another rule. And didn't specify any options either. Will experiment with this when I get into work. Thank you so much for the example. โค๏ธ

FYI: used your config and it worked perfectly, and I learned a few things about babel-loader.