question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Post-css not running

See original GitHub issue

I currently have

loaders: [
            {
                test:   /\.css$/,
                loader: 'style-loader!css-loader!postcss-loader'
            }
        ],
postcss: {
        defaults: [
            autoprefixer({
                browsers: ['last 2 version']
            })
        ]
    }

The CSS I am passing to the loader is

/** @define DateTime; use strict */

:root {
    --DateTime--understateTime-font-size: 0.75em;
}

.DateTime--understateTime .DateTime-time {
    font-size: var(--DateTime--understateTime-font-size); /* 1 */
}

but then what’s being passed back is the same as what is passed the loader any ideas?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
jeron-dioviscommented, Sep 16, 2015

@ai, well, have same issue too. Now it’s with postcss-mixins. Webpack config fragment:

import autoprefixer from "autoprefixer";
import mixins from "postcss-mixins";

...

  module: {
    loaders: [
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract("css?modules=true!postcss"),
      }
    ]
  },

  postcss: [
    mixins(),
    autoprefixer({
      browsers: "last 2 versions"
    })
  ],

styles.css


@define-mixin mixThis $url {
  content: url($url);
}

.test {
  @mixin mixThis "./home.png";
}

And exactly the same I see in output. The most interesting thing here is that autoprefixer works. But mixins are not. Tried both mixins() and mixins in postcss array, no effect.

0reactions
MoOxcommented, Sep 16, 2015

I probably missed the optional notExtractLoader. So I have no idea.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack - Postcss nesting not working used as suggested
CSS variables are defined in the genereated css (colors works). The postcss. config. js is file loaded too.
Read more >
Laravel Mix not running PostCSS plug-ins - Laracasts
I installed the PostCSS plug-ins through NPM but they are not running: mix.sass('resources/sass/website.scss', 'public/css', {}, [ purgecss({ enabled: tru.
Read more >
How to add Tailwind into a React project in under a minute
Step 1 – How to set up React with CRA template. Install the CRA template first, by running: npx create-react-app cool-demo ...
Read more >
postcss-loader - npm
Start using postcss-loader in your project by running `npm i postcss-loader`. There are 10804 other projects in the npm registry using ...
Read more >
tailwind-postcss-not-working - CodeSandbox
tailwind-postcss-not-working. 0. Embed Fork Create Sandbox Sign in. Sandbox Info ... postcss.config.js. styles.css. tailwind.config.js. Dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found