esbuild-css-modules-plugin
Advanced tools
Comparing version 2.5.2 to 2.6.0
@@ -0,1 +1,5 @@ | ||
## V2.6.0 | ||
- `@parcel/css` now named `lightningcss` | ||
- support pascal case by @FuriouZz [#43](https://github.com/indooorsman/esbuild-css-modules-plugin/pull/43) | ||
## V2.5.0 | ||
@@ -2,0 +6,0 @@ |
@@ -71,2 +71,3 @@ import type { OnLoadResult, Plugin, PluginBuild } from 'esbuild'; | ||
}; | ||
usePascalCase?: boolean; | ||
} | ||
@@ -73,0 +74,0 @@ |
@@ -19,4 +19,5 @@ const path = require('path'); | ||
} = require('./utils.js'); | ||
const cssHandler = require('@parcel/css'); | ||
const cssHandler = require('lightningcss'); | ||
const camelCase = require('lodash/camelCase'); | ||
const upperFirst = require('lodash/upperFirst'); | ||
const BuildCache = require('./cache.js'); | ||
@@ -40,3 +41,3 @@ | ||
/** | ||
* @type {import('@parcel/css').BundleOptions} | ||
* @type {import('lightningcss').BundleOptions} | ||
*/ | ||
@@ -63,3 +64,9 @@ const bundleConfig = { | ||
const patchedClass = exports[originClass].name; | ||
cssModulesJSON[camelCase(originClass)] = patchedClass; | ||
let name = camelCase(originClass); | ||
if (options.usePascalCase) { | ||
name = upperFirst(name) | ||
} | ||
cssModulesJSON[name] = patchedClass; | ||
}); | ||
@@ -66,0 +73,0 @@ const classNamesMapString = JSON.stringify(cssModulesJSON); |
{ | ||
"name": "esbuild-css-modules-plugin", | ||
"version": "2.5.2", | ||
"version": "2.6.0", | ||
"description": "A esbuild plugin to bundle css modules into js(x)/ts(x).", | ||
@@ -31,3 +31,3 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@parcel/css": "^1.12.0", | ||
"lightningcss": "^1.16.0", | ||
"fs-extra": "^10.1.0", | ||
@@ -34,0 +34,0 @@ "lodash": "^4.17.21", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37697
996
+ Addedlightningcss@^1.16.0
- Removed@parcel/css@^1.12.0
- Removed@parcel/css@1.14.0(transitive)