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

@vanilla-extract/esbuild-plugin

Package Overview
Dependencies
Maintainers
4
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vanilla-extract/esbuild-plugin - npm Package Compare versions

Comparing version 2.0.5 to 2.1.0

8

dist/declarations/src/index.d.ts

@@ -1,5 +0,8 @@

import { IdentifierOption } from '@vanilla-extract/integration';
import { IdentifierOption, CompileOptions } from '@vanilla-extract/integration';
import type { Plugin } from 'esbuild';
interface VanillaExtractPluginOptions {
outputCss?: boolean;
/**
* @deprecated Use `esbuildOptions.external` instead.
*/
externals?: Array<string>;

@@ -9,4 +12,5 @@ runtime?: boolean;

identifiers?: IdentifierOption;
esbuildOptions?: CompileOptions['esbuildOptions'];
}
export declare function vanillaExtractPlugin({ outputCss, externals, runtime, processCss, identifiers, }?: VanillaExtractPluginOptions): Plugin;
export declare function vanillaExtractPlugin({ outputCss, externals, runtime, processCss, identifiers, esbuildOptions, }?: VanillaExtractPluginOptions): Plugin;
export {};

@@ -14,3 +14,4 @@ 'use strict';

processCss,
identifiers
identifiers,
esbuildOptions
} = {}) {

@@ -64,2 +65,16 @@ if (runtime) {

}) => {
var _esbuildOptions;
const combinedEsbuildOptions = (_esbuildOptions = { ...esbuildOptions
}) !== null && _esbuildOptions !== void 0 ? _esbuildOptions : {}; // To avoid a breaking change this combines the `external` option from
// esbuildOptions with the pre-existing externals option.
if (externals) {
if (combinedEsbuildOptions.external) {
combinedEsbuildOptions.external.push(...externals);
} else {
combinedEsbuildOptions.external = externals;
}
}
const {

@@ -70,4 +85,4 @@ source,

filePath: path,
externals,
cwd: build.initialOptions.absWorkingDir
cwd: build.initialOptions.absWorkingDir,
esbuildOptions: combinedEsbuildOptions
});

@@ -74,0 +89,0 @@ const contents = await integration.processVanillaFile({

@@ -14,3 +14,4 @@ 'use strict';

processCss,
identifiers
identifiers,
esbuildOptions
} = {}) {

@@ -64,2 +65,16 @@ if (runtime) {

}) => {
var _esbuildOptions;
const combinedEsbuildOptions = (_esbuildOptions = { ...esbuildOptions
}) !== null && _esbuildOptions !== void 0 ? _esbuildOptions : {}; // To avoid a breaking change this combines the `external` option from
// esbuildOptions with the pre-existing externals option.
if (externals) {
if (combinedEsbuildOptions.external) {
combinedEsbuildOptions.external.push(...externals);
} else {
combinedEsbuildOptions.external = externals;
}
}
const {

@@ -70,4 +85,4 @@ source,

filePath: path,
externals,
cwd: build.initialOptions.absWorkingDir
cwd: build.initialOptions.absWorkingDir,
esbuildOptions: combinedEsbuildOptions
});

@@ -74,0 +89,0 @@ const contents = await integration.processVanillaFile({

@@ -10,3 +10,4 @@ import { dirname, join } from 'path';

processCss,
identifiers
identifiers,
esbuildOptions
} = {}) {

@@ -60,2 +61,16 @@ if (runtime) {

}) => {
var _esbuildOptions;
const combinedEsbuildOptions = (_esbuildOptions = { ...esbuildOptions
}) !== null && _esbuildOptions !== void 0 ? _esbuildOptions : {}; // To avoid a breaking change this combines the `external` option from
// esbuildOptions with the pre-existing externals option.
if (externals) {
if (combinedEsbuildOptions.external) {
combinedEsbuildOptions.external.push(...externals);
} else {
combinedEsbuildOptions.external = externals;
}
}
const {

@@ -66,4 +81,4 @@ source,

filePath: path,
externals,
cwd: build.initialOptions.absWorkingDir
cwd: build.initialOptions.absWorkingDir,
esbuildOptions: combinedEsbuildOptions
});

@@ -70,0 +85,0 @@ const contents = await processVanillaFile({

{
"name": "@vanilla-extract/esbuild-plugin",
"version": "2.0.5",
"version": "2.1.0",
"description": "Zero-runtime Stylesheets-in-TypeScript",

@@ -18,3 +18,3 @@ "main": "dist/vanilla-extract-esbuild-plugin.cjs.js",

"dependencies": {
"@vanilla-extract/integration": "^4.0.1"
"@vanilla-extract/integration": "^5.0.0"
},

@@ -21,0 +21,0 @@ "devDependencies": {

@@ -91,2 +91,3 @@ # 🧁 vanilla-extract

- [identifiers](#identifiers)
- [esbuildOptions](#esbuildoptions)
- [Styling API](#styling-api)

@@ -397,2 +398,8 @@ - [style](#style)

### esbuildOptions
> Only for `esbuild`, `vite` and `rollup` plugins
esbuild is used internally to compile `.css.ts` files before evaluating them to extract styles. You can pass additional options here to customize that process.
Accepts a subset of esbuild build options (`plugins`, `external`, `define` and `loader`), see https://esbuild.github.io/api/#build-api.
---

@@ -399,0 +406,0 @@

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