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.0.7 to 2.0.8

17

index.js
const path = require('path');
const { createHash } = require('crypto');
const fse = require('fs-extra');

@@ -104,7 +105,7 @@ const fs = require('fs');

setup(build) {
const { outdir, bundle, logLevel, watch } = build.initialOptions;
const { v2 } = options;
const tmpFiles = new Set();
const rootDir = process.cwd();
const tmpDirPath = tmp.dirSync().name;
const { outdir, bundle, logLevel, watch } = build.initialOptions;
const { v2 } = options;

@@ -118,3 +119,9 @@ const outputLogs = logLevel === 'debug' || logLevel === 'verbose';

const fullPath = args.path;
const tmpDir = tmp.dirSync().name;
const hex = createHash('sha256').update(fullPath).digest('hex');
const tmpDir = path.resolve(
process.cwd(),
outdir,
'.esbuild_plugin_css_modules',
hex.slice(hex.length - 255, hex.length)
);

@@ -139,3 +146,3 @@ const tmpCssFile = path.join(

tmpFiles.add(tmpCssFile);
tmpFiles.add(tmpDir);

@@ -154,3 +161,3 @@ return Promise.resolve({

try {
fs.unlinkSync(f);
fse.removeSync(f);
} catch (error) {}

@@ -157,0 +164,0 @@ });

{
"name": "esbuild-css-modules-plugin",
"version": "2.0.7",
"version": "2.0.8",
"description": "A esbuild plugin to bundle css modules into js(x)/ts(x).",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -48,2 +48,3 @@ const esbuild = require('esbuild');

entryPoints: ['app.jsx'],
entryNames: '[name]-[hash]',
format: 'esm',

@@ -50,0 +51,0 @@ target: ['es2020'],

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