-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.lessrc
not used within node_modules
#6623
Comments
This issue can also be related to these issues: |
Configs within your project don't affect files in node_modules. Shouldn't files in node_modules be pre-compiled to CSS before they are published? Otherwise every consumer of the module has to re-create the build configuration somehow. |
This is not my package, but I use it in one of the projects and it does not work with the Parcel. You don't need to import the less file directly. It is enough to import some component from antd to get an error.
I can't say it is good or bad, but what should users do with such an error? |
No, some packages are intentionally uncompiled to allow for customization, e.g. theming. Ant Design is an example for that (see above), as is semantic-ui-less. Please, can we get this to work? |
I ran into this issue when resorting to what I hoped would be a workaround (the umpteenth already while trying for months to get a project onto yarn+pnp without breaking jest, babel, eslint, ts, and parcel[1|2]). This error about .less files happens when I set babel-plugin-import for antd (without which we get an interactable page but without any css) with |
I'm facing the same problem Looking forward to a good solution |
I've come across the same problem. For my case (Antd + less imports + .lessrc or less in manifest + Yarn Berry without PnP), it uses native findAncestry function implementation. Wouldn't be enough to remove the node_modules test blocks defined in both the native and the JS versions? I might miss something but I don't understand why it exists in the first place... lessrc with Ant.design is an example, but I guess it will be the same issue if I import a .ts from a node package that doesn't have a .tsconfig? I mean, project configurations should apply to all the files I import, no matter where they are in the subtree ? |
I ran into this problem using antd and the "@parcel/config-webextension". Long story short you need to import [EDIT]: What does seem to be an issue with this solution is that the |
🐛 bug report
🎛 Configuration (.babelrc, package.json, cli command)
package.json
:.lessrc
:index.ts
:🤔 Expected Behavior
The parcel should use the
.lessrc
config.😯 Current Behavior
I tried to enable inline javascript using
.lessrc
config:But got error:
So I checked a code of
@parcel/transformer-less
and found thatconfigFile
variable isnull
on this line: https://github.com/parcel-bundler/parcel/blob/v2/packages/transformers/less/src/loadConfig.js#L15💻 Code Sample
I created a repo to reproduce the error: https://github.com/AlexeySemigradsky/parcel2-lessrc-bug
🌍 Your Environment
The text was updated successfully, but these errors were encountered: