New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-css-modules-plugin

Package Overview
Dependencies
Maintainers
1
Versions
84
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 3.1.1 to 3.1.2

3

changelog.md

@@ -0,1 +1,4 @@

## V3.1.2
- fix [issue#74](https://github.com/indooorsman/esbuild-css-modules-plugin/issues/74)
## V3.1.1

@@ -2,0 +5,0 @@ - fix build with `bundle: true` & `splitting: true` & multiple entrypoints

13

index.js

@@ -357,9 +357,10 @@ import { basename, dirname, extname, normalize, relative, resolve, sep } from 'node:path';

.then(([css, js]) => {
const cssContent = simpleMinifyCss(css, patchedBuild.esbuild);
const digest = genDigest(c, buildId);
const newJs = js
.replace(
contentPlaceholder,
JSON.stringify(simpleMinifyCss(css, patchedBuild.esbuild))
)
.replace(digestPlaceholder, JSON.stringify(genDigest(c, buildId)));
return newJs;
.replaceAll(contentPlaceholder, `globalThis['__css-content-${digest}__']`)
.replaceAll(digestPlaceholder, `globalThis['__css-digest-${digest}__']`);
return `globalThis['__css-content-${digest}__']=${JSON.stringify(
cssContent
)};globalThis['__css-digest-${digest}__']=${JSON.stringify(digest)};\n${newJs}`;
})

@@ -366,0 +367,0 @@ .then((newJs) => writeFile(fullJsPath, newJs, { encoding: 'utf8' }));

{
"name": "esbuild-css-modules-plugin",
"version": "3.1.1",
"version": "3.1.2",
"description": "A esbuild plugin to bundle css modules into js(x)/ts(x), based on extremely fast [Lightning CSS](https://lightningcss.dev/)",

@@ -5,0 +5,0 @@ "main": "./index.cjs",

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