Code Monkey home page Code Monkey logo

Comments (8)

ColdSauce avatar ColdSauce commented on May 18, 2024 1

Hi @zangguojun,

This is happening because the Parcel CSS parser doesn't believe the imported CSS from @alifd/next/dist/next.css is valid.

This is due to the following line in the CSS file:

@media all and (min-width: 0\0 ) and (min-resolution: 0.001dpcm) {

(The 0\0 is what it is complaining about since it's not valid CSS. It's a hack in CSS to detect IE)

Here's the relevant Parcel issue discussing this.

The way they say to solve it is to use something like patch-package to patch the CSS file in node_modules or submit an issue/PR to the next project asking them to remove the incorrect syntax CSS and use @supports. Most of the issues on that repo are in Chinese, so I'm not sure if someone talked about this already there.

If you find a way to get this to work with Plasmo, it'd be amazing to share it with the community by submitting a PR to our examples repo.

from plasmo.

ColdSauce avatar ColdSauce commented on May 18, 2024 1

It looks like something like this was reported but the maintainer added a wontfix tag,

from plasmo.

louisgv avatar louisgv commented on May 18, 2024

@zangguojun what error are you seeing when doing so?

from plasmo.

zangguojun avatar zangguojun commented on May 18, 2024

@zangguojun what error are you seeing when doing so?

Like this
image

from plasmo.

zangguojun avatar zangguojun commented on May 18, 2024

The example demo: https://github.com/zangguojun/bilibili-classify

from plasmo.

louisgv avatar louisgv commented on May 18, 2024

Technically, we can cook the @alifd/next's css import code in our resolver and make it behave appropriately (i.e, patch out the css pieces that aren't working).

from plasmo.

louisgv avatar louisgv commented on May 18, 2024

Actually - postcss got this! parcel-bundler/parcel#7854 (comment)

@zangguojun try adding that postcss plugin and see if it work - I think we can close this :D

from plasmo.

xmsz avatar xmsz commented on May 18, 2024

parcel-bundler/parcel#7854 (comment)

no working

from plasmo.

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.