diff --git a/changelog.md b/changelog.md index 32f8b1a..4ac44af 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +## 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 - upgrade `@parcel/css` to `1.12.0` diff --git a/index.d.ts b/index.d.ts index 69bb5e1..7686abd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -68,6 +68,7 @@ declare interface PluginOptions { module?: string; version?: string; }; + usePascalCase?: boolean; } declare interface BuildContext { diff --git a/lib/plugin.js b/lib/plugin.js index 5f1d410..9f21f37 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -16,7 +16,7 @@ const { validateNamedExport, getPackageVersion } = 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'); @@ -37,7 +37,7 @@ const buildCssModulesJs = async ({ fullPath, options, build }) => { const cssModulesOption = options.v2CssModulesOption || {}; /** - * @type {import('@parcel/css').BundleOptions} + * @type {import('lightningcss').BundleOptions} */ const bundleConfig = { filename: relative(fullPath), // use relative path to keep hash stable in different machines diff --git a/package.json b/package.json index 8df1067..7d51a05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "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).", "main": "./index.js", "types": "./index.d.ts", @@ -28,7 +28,7 @@ "esbuild": "^0.14.0 || ^0.15.0" }, "dependencies": { - "@parcel/css": "^1.12.0", + "lightningcss": "^1.16.0", "fs-extra": "^10.1.0", "lodash": "^4.17.21", "postcss": "^8.4.12",