martonlederer / esbuild-plugin-postcss2

Use postcss with esbuild
MIT License
33 stars 19 forks source link

Version 0.1.2 breaks the entire plugin. #35

Open FlafyDev opened 2 years ago

FlafyDev commented 2 years ago

Unlike 0.1.1, 0.1.2 doesn't write a .css file when compiling. I'm not sure what the problem is but it's not just for me, and in Github Actions the tests failed.

FlafyDev commented 2 years ago

Seem like the tests started to fail when commit 32d928a79e9ad4e4bb3b0affe19d0d1bad9e59f5 was pushed. I'm not sure what it was trying to do or fix.

timostamm commented 2 years ago

Same here. With:

✘ [ERROR] [plugin postcss2] Cannot read properties of undefined (reading 'getJSON')

    node_modules/esbuild-plugin-postcss2/dist/index.js:73:59:
      73 │         if (typeof modules !== "boolean" && typeof modules.getJSON === "function")
         ╵                                                            ^

    at getJSON (/Users/REDACTED/node_modules/esbuild-plugin-postcss2/dist/index.js:73:60)
alappe commented 2 years ago

Same here. With:

✘ [ERROR] [plugin postcss2] The "path" argument must be of type string. Received undefined

     node_modules/esbuild-plugin-postcss2/dist/index.js:89:78:
       89 │ ...lt.relative(import_path.default.dirname(rootDir), import_path.d...
            ╵                                    ^
g45t345rt commented 2 years ago

I used to use this package until I created my own about 4 months ago. Not sure if it's what you guys need but you can always try it as a quick fix.

https://github.com/g45t345rt/esbuild-style-plugin

It's available as a package npm i esbuild-style-plugin and you can use it in the same way

esbuild.build({
  plugins: [
    stylePlugin()
  ]
})

@martonlederer sorry I really don't want to be an ass for dropping an alternative :S, but I really think it can be helpful to others.

martonlederer commented 2 years ago

no problem. Sadly I do not have time to maintain this pkg... Looking for maintainers tho :)

Sorry everyone affected by this...

kuon commented 2 years ago

@martonlederer Is there any feature not present in @g45t345rt package? I understand you might not want to abandon it, but maybe it would be best to point to @g45t345rt packages at the top of the readme?

martonlederer commented 2 years ago

I have not tried that package, I don't know