Creates a custom resolve function for postcss-import using webpack's enhanced-resolve, enabling the use of webpack aliases and module resolution in CSS @import statements. Current stable version 1.0.1, no recent updates. It bridges postcss-import with webpack's resolver, allowing CSS files to resolve modules via webpack aliases, modules directories, and other enhanced-resolve options. Different from using postcss-import alone, which relies on Node.js module resolution; this package provides tighter integration with webpack configuration.
npm install postcss-import-webpack-resolverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Example of creating a resolver with webpack aliases and modules for postcss-import.
Consider using postcss-import's built-in resolver or other alternatives like postcss-import-resolver.
Ensure enhanced-resolve version compatibility; check enhanced-resolve docs for option changes.
Use webpack 5's built-in CSS resolution or a compatible resolver.
Run npm install enhanced-resolve --save-dev
Use const createResolver = require('postcss-import-webpack-resolver') (CommonJS) or import createResolver from 'postcss-import-webpack-resolver' (ESM).Check that alias paths and modules directories are correctly specified and exist.