-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
The loader does not apply config after search up the directory tree for configuration #98
Comments
Please provide structure of your project |
If you got:
it means you haven't loaded config |
well, it's something like this
|
@creage How you run |
|
Still can't reproduce 😞 Maybe you can create minimum reproducible test repo? |
@creage Here logic what we use for |
So i think you have invalid |
Well, it is extremely strange, but if I try to create a new, simpler repo - I cannot reproduce this issue either. I'll try to investigate it further. P.S. It seems that if I add |
Yes, but autosearch should work out of box, can you write in |
Well, I hope I won't be fired for sharing this :) It seems that not ALL accesses to I also compile some stuff from P.S. I'm also using
|
If you use monorepo I recommend to set
no important information here 😄 |
hm, should not, otherwise it is bug on |
OK, I think I've found the issue. So, once again - I have a monorepo, with packages. All package dependencies are hoisted to the root. Every package has it's own Now I go into package folder, and try to build that package. And all package style files are processed by But for files that I import from other dependencies, which are in a hosited If I just put a copy of And I think passing the right path to config file is the only correct way to fix my issue. |
Good catch, that is what I meant when I said that I recommend specifying the config option for monorepos, because we really don't know what config to use, anyway if you have ideas how we can improve it feel free to feedback |
I'm upgrading I get:
Which is the right place to look it for:
It tried renaming the config file to the diff versions without success. I checked file permissions as well:
What could it be? 🤔 I also tried adding a trailing slash to the string passed as |
@stefanmaric Can you create reproducible test repo? Maybe we can improve DX with monorepos, I want to test old version and new version |
Give me a min to try |
@evilebottnawi so while creating the test case I discovered it is not related to the monorepo but to the If you remove the two lines that include This is the case if you use Maybe we move it to a new issue? |
@stefanmaric just note - you can replace |
Other notes - you don't need |
@stefanmaric Yep, but on Anyway you can send a fix, problem - we don't have |
@evilebottnawi thanks for the tips! I will apply them to test repo as well to have the test case use contrib modules only. I extracted those bits from the project I'm working on which has been maintaining a webpack config in prod since 2016 — it is actually amazing it is not an uglier Frankenstein 😄 I will take a look at |
@evilebottnawi I simplified the test case config as you suggested: stefanmaric/postcss-loader-monorepo-test@018456f As well as in the project I'm working with. Thanks! |
Expected Behavior
I have
postcss.config.js
file in the root of the project, mywebpack.config.js
is imported from./webpack/app
folder. I expect mypostcss
configuration to be used/applied correctly.Actual Behavior
Running webpack ends up with console messages:
You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
And the
postcss.config.js
file is actually loaded - I've tried to add simpleconsole.log('Im here')
to it, and this message appears in my console, as expected. But, apparently, options exported from that file are not correctly sent topostcss
.Code
The text was updated successfully, but these errors were encountered: