Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 29 23:49
    dcwither commented #1453
  • Oct 29 11:54
    ai closed #1453
  • Oct 29 11:54
    ai commented #1453
  • Oct 28 20:28
    dcwither commented #1453
  • Oct 28 18:09
    dcwither commented #1453
  • Oct 28 17:57
    dcwither commented #1453
  • Oct 28 17:54
    dcwither commented #1453
  • Oct 28 17:27
    dcwither commented #1453
  • Oct 28 11:05
    munan2 commented #1452
  • Oct 28 07:07
    Semigradsky commented #1452
  • Oct 28 07:07
    ai closed #1452
  • Oct 28 07:06
    Semigradsky commented #1452
  • Oct 28 07:06
    Semigradsky commented #1452
  • Oct 28 06:49
    ai commented #1452
  • Oct 28 06:49
    ai commented #1452
  • Oct 28 06:49
    ai commented #1452
  • Oct 28 06:44
    Semigradsky commented #1452
  • Oct 28 04:57
    ai commented #1453
  • Oct 28 04:12
    dcwither edited #1453
  • Oct 28 04:12
    dcwither opened #1453
Evilebot Tnawi
@evilebottnawi
i am maintainer of postcss-loader :smile:
Sam Smith
@smth

Hi. I've run into a problem a couple of times now. I'm hoping someone might be able to shed some light on it. This seems to only occur once the codebase gets large. I don't have a minimal example, but I'll describe what one might look like.

File A has multiple (postcss-advanced-variables) mixin definitions.
File B calls one of those mixins, and passes parameters.
File C, calls another.
File D (postcss-import) imports file A, file B, and file C, and gets outputted.

When the problem arises, changes to parameters in file C for example have no effect on the output from file D. It feels as though something is being cached somewhere, to the point that even deleting the mixin in file A has no effect on the output. At this point I would expect there to be an error, because I'm calling a mixin that doesn't exist, but all gulp processes appear to run fine, and I can continue to edit file B and see those changes reflected.

I don't understand what's happening here. Any ideas?

Sam Smith
@smth
I should add that I'm using postcss-custom-properties too.
Sam Smith
@smth
Stopping the Gulp process can result in the expected error. I would then expect at this point, if there was some caching responsible for the strange behaviour, it will now have been cleared. However, reinstating the mixin again results in an output with old values (values that no longer exist anywhere in the codebase).
Jonathan Neal
@jonathantneal
This is really random, @evilebottnawi, but I noticed a very reversion in style-loader that I’m not sure was intended.
Specifically, it was this work from last year: webpack-contrib/style-loader#219
That PR clearly shows that the work was approved and merged. However, the work was merged into a webpack-contrib:next branch on May 22, 2018.
Evilebot Tnawi
@evilebottnawi
oh, style-loader in my todo, but not near future
maybe next month
Jonathan Neal
@jonathantneal
Maybe I can help?
Jonathan Neal
@jonathantneal
Fix submitted, @evilebottnawi webpack-contrib/style-loader#382
With this fix, we can have source map support in Create React App again. :tada:
Jonathan Neal
@jonathantneal
@evilebottnawi what can I do to help here? I know there has been a refactor since the last version — do you need more tests? Is there a project board?
Evilebot Tnawi
@evilebottnawi
@jonathantneal thanks for helping, no desk, just need tests and refactor code on separate files, or we can merge this, drop old node and release next version, and do other things in 2 version :smile:
Jonathan Neal
@jonathantneal

tests and refactor code on separate files

@evilebottnawi, is this something I can help with? As far as I know, the tests are in separate files from the functional code already. Maybe I am misunderstanding you?

Evilebot Tnawi
@evilebottnawi
@jonathantneal oh, i think we need refactor https://github.com/webpack-contrib/style-loader/blob/master/src/addStyles.js to separate files like utils/insertStyleElement.js, utils/removeStyleElement.js, and test them better
Jonathan Neal
@jonathantneal
Right. That makes sense. With the fix in 382, would it be a good idea to release that, and then perform the refactor separately? It would seem better to me, only because then we are not introducing too many changes in a single release.
Evilebot Tnawi
@evilebottnawi
@jonathantneal 383 :smile: yep, but will be great do refactor before release next version, sometimes you do regression when refactor, will be great catch them after release, because some regressions require new major release
Jonathan Neal
@jonathantneal
Oh right, 383. :smile:
Jonathan Neal
@jonathantneal
One thing I’ve noticed is that I cannot npm link within style-loader and then npm link style-loader in a project and verify the changes. I am wondering if something about the dist is now different?
This is just a theory, but I wonder if you already did a refactor since the last release, and did not update the package.json files field, maybe?
Jonathan Neal
@jonathantneal
What is the ose branch used for, @ai?
Is that the next version? Will it be major? minor? patch?
Andrey Sitnik
@ai
@jonathantneal 7.0, next major release (drop Node.js 4, 6, use ES6 without Babel, add visitor API)
Jonathan Neal
@jonathantneal
Awesome! Will you publish an @next version of the beta or RC before the full release?
I would love to rework my plugins before it is fully released.
Andrey Sitnik
@ai
I found performance regression and we are writing docs about creating plugins
when these tasks will be finished we are ready for release
To be honest, you do not need @next to test a new major update. Since we do not use Babel anymore, you can use master from GitHub in dependencies and everything will work
we do not have publish step anymore, it is so great!
Ju Demarque
@dmrqx

Hi! I have a question concerning testing components with Jest that depend on values obtained from a css file (via postcss-modules-values @value variables).

In my configuration I am using identity-obj-proxy for .modules.css files, as recommended, but it also transforms @value declarations to plain name strings with no way of recovering the actual values.

The solution I found was to mock the .module.css file into the component tests, but this way I have to mock it for all the parents of said component as well.

Does this sound "appropriate"? Is there another way of resolving jest warnings that may appear when using @value properties in JS?

Evilebot Tnawi
@evilebottnawi
@ai hi, i want to update postcss-loader to new major release (update deps, drop node@6 and etc), will be great also update postcss too, any ETA for next postcss release?
Andrey Sitnik
@ai
@evilebottnawi there is performance regression in the next release branch and I have no time to investigate it. Release it without waiting for PostCSS. I afraid the best release could be only in month or more
f0x52
@f0x52
Can I get postcss to only namespace a top-level class, and then use nesting without getting those classes namespaced as well?
I'm using it with React and my optimal usecase would be to have everything namespaced on component level, but being able to use normal classnames inside that component
kapilpipaliya
@kapilpipaliya
i am new to postcss. which plugins should i use?
i am using postcss-preset-env now
Ryan Zimmerman
@RyanZim
@kapilpipaliya It depends what you want to do. There's a plugin for just about everything
postcss-preset-env allows you to use new CSS features
kapilpipaliya
@kapilpipaliya
hi
Ryan Zimmerman
@RyanZim
There are other plugins that allow you to do other things not possible with regular, spec CSS
kapilpipaliya
@kapilpipaliya
i want to use latest technologies
which plugins you recommand?
Ryan Zimmerman
@RyanZim
postcss-preset-env is what you're looking for, in that case
kapilpipaliya
@kapilpipaliya
any other plugins i should use?
Ryan Zimmerman
@RyanZim
If you're just looking for modern CSS not yet supported in browsers, postcss-preset-env should get the job done.
kapilpipaliya
@kapilpipaliya
thanks
Ryan Zimmerman
@RyanZim
no problem, stop by anytime, happy to help!
kapilpipaliya
@kapilpipaliya
thank you
Evilebot Tnawi
@evilebottnawi
@ai thanks for answer, also i ahve some problem in npm, can you give me access to npm (https://www.npmjs.com/package/postcss-loader), thanks again