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
0
votes
0 answers

Loading PostCSS "postcss-import" plugin failed: Cannot find module 'postcss-import'

I am installing vue2 without installing any external packages. I get this error after saying npm run serve. It gives the following error. I couldn't come to a conclusion from my research. It didn't give an error when I downloaded it the same way on…
rs7
  • 1
  • 2
0
votes
1 answer

Webpack Dev Server stops on error originated in postcss-loader

I'm using webpack-dev-server for development but after upgrading to webpack 5 it just stops when postcss-loader can't parse css file. I start dev server via npx webpack-dev-server and when I start typing new rule in .css webpack tries to rebuild my…
0
votes
1 answer

Issues loading css files sass-loader

Created a new react project with the package.json below: { "name": "test-react-app", "version": "0.1.0", "private": true, "scripts": { "start": "react-scripts start", "build": "react-scripts build", …
Unprof
  • 27
  • 5
0
votes
0 answers

NPM audit gives 3 errors I cant resolve

I tried installing and adding the v-calendar plugin to my VUE project. but I am new to vue and don't really understand this errors showing up npm audit # NPM audit report postcss <7.0.36 Severity: moderate Regular Expression Denial of Service in…
0
votes
1 answer

X [ERROR] [plugin esbuild-style-plugin] PostCSS config file at E:\...\postcss.config.js can't load

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'e:' at new NodeError (node:internal/errors:371:5) at defaultResolve…
0
votes
1 answer

Module build failed, Error: Failed to find css

I get below error when I try to upgrade from angular 7 to 8. ERROR in ./src/css/styles.scss…
user923499
  • 305
  • 1
  • 6
  • 18
0
votes
1 answer

React storybook PostCSS configuration

I am setting up a storybook for my React app. I am facing an issue with PostCSS, apparently my storybook configuration does not process PostCSS and my styles are completely ignored. This is my package.json: { ... "devDependencies": { …
luthien
  • 1,285
  • 3
  • 15
  • 26
0
votes
1 answer

Rails Tailwind Setup: Module build failed (from ./node_modules/postcss-loader/src/index.js):

I was following this tutorial (https://web-crunch.com/posts/how-to-install-tailwind-css-using-ruby-on-rails) for setting up tailwind in a rails app. I am using rails 6.1.3.1 and ruby 3.0.1. My CSS seems not to load despite I followed all steps. When…
Sabrina
  • 309
  • 1
  • 14
0
votes
1 answer

Webpack postcss-loader causing a sass error

I'm trying to include Tailwind CSS within my WordPress setup, which means I have to use post CSS. However when I add the postcss-loader to this rule: { test: /\.(sass|scss)$/, use: [MiniCssExtractPlugin.loader, 'css-loader',…
0
votes
3 answers

"TypeError: node.getIterator is not a function" in SCSS compilation after migration to Angular 11 (custom webpack)

An error occures in the loading of scss-files in my Angular project. This error appeared first after I migrated from Angular v9 to v11 (I followed the migration guide and all went smooth). The error: Error: ./src/styles.scss Module build failed…
Marty
  • 96
  • 1
  • 3
  • 10
0
votes
1 answer

Reducing CSS in Webpack project

Looking for the best way to eliminate redundant CSS code in my Webpack project ie. I'm importing a local Bootstrap css file in the src folder, but use very little of it. vendor.scss: @import "./css/bootstrap.min.css"; vendor.js: import…
seixwebdev
  • 111
  • 2
  • 4
  • 14
0
votes
2 answers

webpack.code build is broken after update postcss-loader from 3.0.0 to 4.1.0

I'm using lates webpack 4 (not 5) with latest CkEditor 5 and postcss-loader. Everything is fine, when I use postcss-loader 3.0.0. After update it to 4.1.0 I got this error message: "ValidationError: Invalid options object. PostCSS Loader has been…
martonx
  • 1,972
  • 4
  • 25
  • 42
0
votes
1 answer

Using 'craco' with 'less' and 'postcss'

I use craco to customize configuration. I want to use less module and postcss and some postcss plugins,but I have encountered many problems craco.config.js style: { postcss: { plugins: [ require('postcss-px-to-viewport')({ …
H.ont
  • 1
  • 1
  • 1
0
votes
1 answer

Generate CSS browser prefixes in separately file

I'm trying to generate in Webpack two separate css sheets: style.css and style-prefixes.css with prefixes only. For now, it generate one file with all styles and prefixes. My loader in webpack: scss = { test: /\.scss$/, use: [ { loader:…
0
votes
2 answers

Autoprefixer in Webpack not prefixing

I've put together my first, very simple Webpack config from scratch. In this I would like to bundle JS and also compile, minimize and autoprefix SCSS. The code looks like this: webpack.config.js const path = require('path'); module.exports = { …
tobiasg
  • 983
  • 4
  • 17
  • 35