PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.64k stars 370 forks source link

[BUG] Mantine example breaks the moment I add `light-dark: _______` to CSS / SCSS file #1098

Open kylanhurt opened 1 month ago

kylanhurt commented 1 month ago

What happened?

Created the --with-mantine repository from scratch then tried to copy over the Mantine UI example for Sidebar, including the SCSS file. It looks like using the light-dark(______) function in CSS breaks the build. It renders a 🔴 ERROR | Cannot read properties of undefined (reading 'input') error (see below).

Considering that the light-dark method is supported in all major browsers I believe it should work in Plasmo!

Here is a repository to reproduce the issue: https://github.com/kylanhurt/plasmo-mantine-issue

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

🔴 ERROR  | Cannot read properties of undefined (reading 'input')
🟡 20     | TypeError: Cannot read properties of undefined (reading 'input')
    at Rule.toJSON (/Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/postcss@8.4.47/node_modules/postcss/lib/node.js:338:40)
    at /Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/postcss@8.4.47/node_modules/postcss/lib/node.js:330:22
    at Array.map (<anonymous>)
    at Root.toJSON (/Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/postcss@8.4.47/node_modules/postcss/lib/node.js:328:29)
    at Object.transform (/Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/@parcel+transformer-postcss@2.9.3_@parcel+core@2.9.3/node_modules/@parcel/transformer-postcss/lib/PostCSSTransformer.js:245:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Transformation.runTransformer (/Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/@parcel+core@2.9.3/node_modules/@parcel/core/lib/Transformation.js:568:5)
    at async Transformation.runPipeline (/Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/@parcel+core@2.9.3/node_modules/@parcel/core/lib/Transformation.js:346:36)
    at async Transformation.runPipelines (/Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/@parcel+core@2.9.3/node_modules/@parcel/core/lib/Transformation.js:229:40)
    at async Transformation.runPipelines (/Users/kylan/Documents/twitter-turbo/x-turbo-plasmo/node_modules/.pnpm/@parcel+core@2.9.3/node_modules/@parcel/core/lib/Transformation.js:269:34)

(OPTIONAL) Contribution

Code of Conduct

hilmia commented 1 month ago

I have the same issue, is there any way to make this work?