Comments (8)
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.
It looks like something like this was reported but the maintainer added a wontfix
tag,
from plasmo.
@zangguojun what error are you seeing when doing so?
from plasmo.
@zangguojun what error are you seeing when doing so?
from plasmo.
The example demo: https://github.com/zangguojun/bilibili-classify
from plasmo.
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.
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.
parcel-bundler/parcel#7854 (comment)
no working
from plasmo.
Related Issues (20)
- [BUG] antd 5.16.1 failed to render the style (cssinjs) HOT 1
- [BUG] In a monorepo project, Plasmo as a submodule cannot utilize the React package within the main project. HOT 2
- [BUG] Manifest file is missing or unreadable when using --with-example
- [BUG] Using PDF.js (pdfjs-dist) in Plasmo project generates file with name "_empty.<random number>.js" that is reserved by the system HOT 1
- [BUG] Unable to Run Tests in with-jest Starter Repo
- [BUG] Tests Crashing Due to SyntaxError in @plasmohq/storage Package
- [BUG] example with-content-scripts-ui,where the CSUI container is lost after navigating within the SPA and upon returning. HOT 1
- [BUG] hot reload doesnt work when editing devtools.tsx HOT 1
- [BUG] Removing some MUI component in example causes 'Uncaught TypeError: defaultShouldForwardProp is not a function' error
- [BUG] Tab pages do not support hot reloading.
- [BUG] plasmo build --hoist HOT 2
- [EXP]
- [EXP] getInlineAnchorList() and custom getRootContainer() Example
- getStyle: PlasmoGetStyle api unable to get live-reload effect. HOT 2
- [BUG] The with-env example does not work
- [BUG] How to use tailwindcss style for suspended elements in custom components in contentui?
- [RFC] Manifest override by special target
- [BUG] tailwindcss doesn't work in content script UI HOT 4
- [RFC] Add Debugging Support
- [BUG] Service worker (background.ts) is not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plasmo.