The resolve
option has two parameters now and can return null
. Thanks to Rene Haas (@KingSora)
https://github.com/madyankin/postcss-modules/commit/86d8135cb5014d0b2848ef395608ee74d82bd179
Parameters:
file
— a module we want to resolveimporter
— the file that imports the module we want to resolve
Return value: string | null | Promise<string | null>
postcss([
require("postcss-modules")({
resolve: function (file, importer) {
return path.resolve(
path.dirname(importer),
file.replace(/^@/, process.cwd()
);
},
}),
]);
- #140 "'Failed to obtain root' error on Windows" fixed by Pierre LeMoine (@DrInfiniteExplorer) madyankin#144
icss-replace-symbols
replaced with withicss-utils
by Jason Quense (@jquense). The updated replacer works better and will replace values in selectors, which didn't work until now. madyankin#145
- Fixed
composes
on Windows by @sapphi-red madyankin#135 - Updated Babel to v7 by @sapphi-red. Minimal supported version of Node.js is 10 from now madyankin#134
- Fixed errors when using shorthand selectors by Felix Bruns (@fxb) madyankin#130
- Updated the
generic-names
dependency to reduce packages size by Bogdan Chadkin (@TrySound) madyankin#129
- Fix the build
- Fixed the
resolve
option behaviour by @kamilic madyankin#127
- Added the
resolve
option to configure lookup paths for composes/from by @kamilic madyankin#126
- Fixed package contents
- Fixed TypeScript typings by Shuman Lim (@origin-master) madyankin#124
- Added TypeScript typings by Shuman Lim (@origin-master) madyankin#123
- Upgraded to PostCSS 8 by Evan You (@yyx990803) madyankin#114
- Fixed user plugins order by Tom Jenkinson (@tjenkinson) madyankin#112
- Fixed an issue when some plugins were running multiple times by Tom Jenkinson (@tjenkinson) madyankin#111
- [
localsConvention
option] now supports a custom function(originalClassName: string, generatedClassName: string, inputFile: string) => className: string
by Gregory Waxman (@Akkuma) madyankin#109
- Added
exportGlobals
option
- Dropped
css-modules-loader-core
dependency - Upgraded all the dependencies
- Dropped support for unsupported Node versions. Supported versions are 10, 12 and 14+ https://nodejs.org/en/about/releases/
localsConvention
option by Hamza Mihai Daniel (@allocenx) madyankin#103, madyankin#93
camelCase
camelCase removed, use thelocalsConvention
option instead.
- Added
hashPrefix
option by Jesse Thomson (@jessethomson) madyankin#98
- Rebublished the previous release. Sorry :(
- Added export for other plugins by Evilebot Tnawi (@evilebottnawi) madyankin#88, madyankin#29
- Move dev tools to devDependecies by Anton Khlynovskiy (@ubzey) madyankin#85
- Updated dependecies
- Added prettier to format code
- Added option to transform classes to camelCase by Igor Ribeiro (@igor-ribeiro) madyankin#82
- Added ability to transmit outputFileName into getJSON by @lutien madyankin#72
- Dropped support for Node < 6
- Updated dependencies
- Updated PostCSS to 6 by Alexey Litvinov (@sullenor) madyankin#65
- Allowed empty string as opts.root by Sharon Rolel (@Mosho1) madyankin#56
- Allow async getJSON by Philipp A. (@flying-sheep) madyankin#59
- Added the
root
option to pass the root path by Sharon Rolel (@Mosho1) (madyankin#55)
- Fixed regression in
isValidBehaviour
function (madyankin#53)
- Refactored
getDefaultPluginsList
function
- Fixed
generateScopedName
bug with multiple postcss-modules instances (madyankin#37)
- Added
globalModulePaths
option (Thanks to @pospi). - Refactored all the things.
- Updated dependencies
- Fixed sorting for composed dependencies by Josh Johnston (@joshwnj) (madyankin#38)
- Added
scopeBehaviour
option (madyankin#22) - Added ability to pass a string to
generateScopedName
(madyankin#21) - Updated dependencies
- Fixed processing errors capturing by Boris Serdiuk (@just-boris)
- Added support for custom loaders by Björn Brauer (@ZauberNerd)
- Fixed processing for imported CSS
- Added default callback for saving exported JSON
- Fixed JSON export with shallow imports (madyankin#12)
- Fixed lookup paths (madyankin#13)
- Fixed imports overriding (madyankin#15)
- Global refactoring under the hood
Fixed failing on comments by @dfreeman (madyankin#14)
Fixed module export for ES5 (madyankin#9)
Call getExports only for top level css
Initial version