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.0.0-dev.17 to 3.0.0-dev.18

22

index.js

@@ -125,2 +125,20 @@ import { basename, dirname, extname, normalize, relative, resolve, sep } from 'node:path';

if (injectCss) {
const anotherBuildOptions = { ...patchedBuild.initialOptions };
delete anotherBuildOptions.entryPoints;
delete anotherBuildOptions.plugins;
const { outputFiles } = await patchedBuild.esbuild.build({
...anotherBuildOptions,
absWorkingDir: buildRoot,
stdin: {
contents: buildResult?.css ?? '',
resolveDir: dirname(path),
sourcefile: rpath,
loader: 'css'
},
bundle: true,
minify: true,
sourcemap: false,
write: false,
outExtension: { '.css': '.css' }
});
return {

@@ -130,3 +148,3 @@ contents: buildResult?.js

contentPlaceholder,
JSON.stringify(simpleMinifyCss(buildResult?.css, patchedBuild.esbuild))
JSON.stringify(outputFiles.find((f) => basename(f.path) === 'stdin.css')?.text ?? '')
)

@@ -155,2 +173,4 @@ .replace(digestPlaceholder, JSON.stringify(genDigest(rpath, buildId))),

},
bundle: true,
sourcemap: false,
outfile: resolve(

@@ -157,0 +177,0 @@ buildRoot,

5

package.json
{
"name": "esbuild-css-modules-plugin",
"version": "3.0.0-dev.17",
"version": "3.0.0-dev.18",
"description": "A esbuild plugin to bundle css modules into js(x)/ts(x).",

@@ -20,3 +20,4 @@ "main": "./index.cjs",

"plugin",
"css modules"
"css modules",
"lightningcss"
],

@@ -23,0 +24,0 @@ "engines": {

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