Questions tagged [postcss-loader]

configure postcss for css assets transformations inside webpack process

instead of postcss.config.js postcss configuration can be set inside webpack.config:

{
  loader: 'postcss-loader',
  options: {
    config: {
      ...
    }
  }
}

Other problematic that cover this topic: cascade configuration and postcss plugins configuration.

https://github.com/postcss/postcss-loader

119 questions
1
vote
0 answers

I cannot set up the autoprefixer in VueCLI with POSTCSS

I want set up autoprefixer plugin with postcss-loader. Because apparently vue-loader in version 15 does not activate the autoprefixer by default. I have tried several ways to do this, put the postcss configuration in a separate file, in the…
1
vote
1 answer

Post CSS parse error on calc() of CSS variables with several default values

I'm running a Nuxt.JS project with Post CSS and get the following error while generating the project's static version: JisonParserError: Parse error on line 1: calc(100% / 12) * var(--cols-md, var(--cols-sm, var(--cols,…
chrs
  • 159
  • 1
  • 8
1
vote
1 answer

Passing custom tailwind config file to postcss loader

In my project I want to generate 2 tailwind files. Frontend file, no prefixes Admin file, all classes prefixed I have added 2 config files: tailwind.config.js tailwind.admin.config.js Inside tailwind.admin.config.js I have added the…
Guerrilla
  • 13,375
  • 31
  • 109
  • 210
1
vote
2 answers

Webpack css-loader UnhandledPromiseRejectionWarning: Error: The module created for a LoaderDependency must have an original source

All the plugins listed below are on the latest version. less-loader: 7.2.1 css-loader: 5.0.1 file-loader: 6.2.0 postcss-loader: 4.1.0 extract-loader: 5.1.0 autoprefixer: 10.2.1 My postcss config: module.exports = { plugins:…
Thomas L
  • 320
  • 3
  • 14
1
vote
1 answer

How to use postcss-loader with sass-loader in webpack

I'm trying to build a webpack config that transpiles my sass and utilizes the postcss autoprefixer plugin. Having researched and tried out various solutions to this, I have come up with the following setup: webpack.config.js: ... { test: …
Mike Hawkins
  • 2,144
  • 5
  • 24
  • 42
1
vote
1 answer

postcss is not working in combination with webpack 5 and sass

im using webpack 5 and latest css/postcss/sass packages. now im getting the error Module not found: Error: path argument is not a string If i remove the postcss loader it works. Thats the code rules: [{ test: /\.s?css/i, …
Znar
  • 193
  • 12
1
vote
0 answers

Webpack autoprefixer problem. .browserslitrc ignored

I am using webpack, postcss, browserslit and autoprefixer. Everything is working good except autoprefixer. When i write this css code, output is same. I checked my .css codes and browserslist config in https://autoprefixer.github.io/ Is my config…
wpuzman
  • 340
  • 1
  • 5
  • 14
1
vote
2 answers

How to fix “Module build failed (from ./node_modules/postcss-loader/src/index.js)”

I'm getting this error when I try to run my app, I'm using all the same dependencies that I always use so I'm very baffled by this. Warn in in ./assets/css/style.css Module Warning (from ./node_modules/postcss-loader/src/index.js): (13:3) start…
1
vote
2 answers

Is postcss-loader necessary for transpiling sass to css via webpack?

I am currently learning sass/scss and I'm trying to set up a webpack configuration for a practice project. So I looked up the tools and technology I'd need, some resources suggested I use "node sass, sass-loader and css-loader"(the webpack…
Richmond M
  • 11
  • 1
  • 7
1
vote
1 answer

stylelint throws at-rule-* errors when parsing LESS variables

I'm using stylelintas a postcss plugin in my webpack config. Further up the chain (so being executed after the postcss-loader), I'm also using less-loader. All dependencies are used in their most current…
Constantin Groß
  • 10,719
  • 4
  • 24
  • 50
1
vote
1 answer

Webpack postcss prefixer in vue-cli 3

I need to prefix the Bulma css classes by using webpack. I found an example but my app uses Vue CLI 3 and I'm not sure how to translate the webpack config to a vue.config.js. This is the webpack config In my vue.config.js I have the following: …
Christiaan Maks
  • 3,248
  • 3
  • 23
  • 27
1
vote
0 answers

Logging what plugins PostCSS is running with?

I'm writing a CLI that uses PostCSS and even though I don't have uncss in the plugins array, I'm getting error reports from uncss. Is there a way to have PostCSS print out what plugins are currently loaded? This issue is related to this issue.
Ole
  • 41,793
  • 59
  • 191
  • 359
1
vote
1 answer

Module not found: Error: Can't find options with ident 'postcss'

I'm new on stackoverflow to ask you a question that I never find on the internet... I hope I'm in the good website :) So here is my problem : I would like to import some css files to a react application from node_modules dependencies. I use webpack…
Aurélien
  • 241
  • 1
  • 2
  • 9
1
vote
0 answers

sourceMap in Webpack - devtool vs loaders

Webpack 3. What is the relations between Webpack's Devtool and the sourceMap attribute in sass-loader, postcss-loader, css-loader and style-loader. Overriding? Overlapping? Its seems to me devtool is not effecting the sourceMaps while loaders are…
chenop
  • 4,743
  • 4
  • 41
  • 65
1
vote
1 answer

Webpack 4 generate only css

I have a project without javascript but would like to use webpack 4 and postcss. Every time I run webpack --mode development, a "style.js" is automatically created in the ./dist folder. How can I prevent this? webpack.config.js: module.exports = { …
Jan
  • 43
  • 1
  • 7