babel-plugin-react-css-modules icon indicating copy to clipboard operation
babel-plugin-react-css-modules copied to clipboard

Upgrade postcss to 8

Open winston0410 opened this issue 4 years ago • 3 comments

I hope this plugin could upgrade its PostCSS version to 8, which is needed for many plugins and it is backward compatible with PostCSS 7

winston0410 avatar Nov 25 '20 04:11 winston0410

Contributions are welcome.

gajus avatar Nov 26 '20 17:11 gajus

This ticket needs to be high priority already. Very many packages are migrated to postcss 8 but babel-plugin-react-css-modules are the one which resists to apply those upgrades.

Because of that, many projects have to continue using old vulnerable packages.

Of course I can help upgrading the module, but I believe there are many other contributors who are able to done the job faster since they know under-the-hood of the plugin.

https://evilmartians.com/chronicles/postcss-8-plugin-migration

mikkpokk avatar Oct 13 '21 14:10 mikkpokk

I have the same pro, I use postcss-nested & less but error

plugins: [
    [
      'react-css-modules',
      {
        filetypes: {
          '.less': {
            syntax: 'postcss-less',
            plugins: ['postcss-nested'],
          },
        },
        autoResolveMultipleImports: true,
        webpackHotModuleReloading: true,
        exclude: 'node_modules',
        generateScopedName: process.env.NODE_ENV === 'development' ? '[local]_[hash:base64:6]' : '[hash:base64:6]'
      },
    ],
  ],
error: PostCSS plugin postcss-nested requires PostCSS 8
/node_modules/babel-plugin-react-css-modules/node_modules/postcss/lib/processor.es6:117:15

aaabinbin avatar Jan 11 '22 09:01 aaabinbin