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 3.0.0-dev.9 to 3.0.0-dev.10

index.cjs

14

index.js
import { basename, dirname, extname, normalize, relative, resolve, sep } from 'node:path';
import { CSSTransformer, CSSInjector } from './lib/css.helper.js';
import { prepareBuild } from './lib/plugin.js';
import {

@@ -13,6 +12,8 @@ contentPlaceholder,

pluginName,
simpleMinifyCss
simpleMinifyCss,
validateOptions
} from './lib/utils.js';
import { compact } from 'lodash-es';
import { readFile, writeFile } from 'node:fs/promises';
import { patchContext } from './lib/context.js';

@@ -28,5 +29,10 @@ /**

const options = _options || {};
const patchedBuild = prepareBuild(build, options);
validateOptions(options);
const patchedBuild = patchContext(build, options);
const { log, buildId, buildRoot } = patchedBuild.context;
log(`initialize build context with options:`, options);
log(`root of this build(#${buildId}):`, buildRoot);
const modulesCssRegExp = getModulesCssRegExp(options);
const { buildRoot, log, buildId } = patchedBuild.context;
const bundle = patchedBuild.initialOptions.bundle ?? false;

@@ -33,0 +39,0 @@ const forceBuild = options.force ?? false;

@@ -113,3 +113,3 @@ import { bundle as bundleModulesCss } from 'lightningcss';

async dispose() {
dispose() {
CSSInjector.__instances__.delete(this.build);

@@ -116,0 +116,0 @@ }

{
"name": "esbuild-css-modules-plugin",
"version": "3.0.0-dev.9",
"version": "3.0.0-dev.10",
"description": "A esbuild plugin to bundle css modules into js(x)/ts(x).",
"main": "./index.js",
"main": "./index.cjs",
"module": "./index.js",
"types": "./index.d.ts",
"type": "module",
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.js",
"require": "./index.cjs",
"default": "./index.js"
}
},
"keywords": [

@@ -34,3 +42,4 @@ "esbuild",

"lightningcss": "^1.20.0",
"lodash-es": "^4.17.21"
"lodash-es": "^4.17.21",
"lodash": "^4.17.21"
},

@@ -40,2 +49,2 @@ "publishConfig": {

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