Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-css-modules-plugin

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-css-modules-plugin - npm Package Compare versions

Comparing version 2.5.2 to 2.6.0

4

changelog.md

@@ -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 @@

13

lib/plugin.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc