esbuild-css-modules-server-plugin
Advanced tools
Comparing version 0.1.4 to 0.1.5
import { Plugin } from 'esbuild'; | ||
import { CompileCssConfiguration } from 'node-css-require'; | ||
export type { CompileCssConfiguration } from 'node-css-require'; | ||
export interface CSSServerPluginOptions { | ||
onCSSGenerated?: (css: string) => void; | ||
cssConfig?: CompileCssConfiguration; | ||
} | ||
@@ -5,0 +8,0 @@ declare const pluginFactory: (opts?: CSSServerPluginOptions) => Plugin; |
@@ -16,3 +16,3 @@ "use strict"; | ||
const text = await fs_1.default.promises.readFile(args.path, 'utf8'); | ||
const res = (0, node_css_require_1.compileCss)(text, args.path); | ||
const res = (0, node_css_require_1.compileCss)(text, args.path, opts === null || opts === void 0 ? void 0 : opts.cssConfig); | ||
const js = res.js; | ||
@@ -19,0 +19,0 @@ if (opts === null || opts === void 0 ? void 0 : opts.onCSSGenerated) { |
{ | ||
"name": "esbuild-css-modules-server-plugin", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "esbuild plugin for bundling CSS module files for server-side rendering", | ||
@@ -39,10 +39,10 @@ "keywords": [ | ||
"dependencies": { | ||
"node-css-require": "0.1.3", | ||
"node-css-require": "0.1.4", | ||
"postcss-modules-sync": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@goldstack/utils-git": "0.1.36", | ||
"@types/jest": "^27.5.1", | ||
"@types/node": "^17.0.33", | ||
"esbuild": "^0.14.48", | ||
"@goldstack/utils-git": "0.1.37", | ||
"@types/jest": "^28.1.8", | ||
"@types/node": "^18.7.13", | ||
"esbuild": "^0.15.5", | ||
"jest": "^28.1.0", | ||
@@ -49,0 +49,0 @@ "rimraf": "^3.0.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7540
41
+ Addednode-css-require@0.1.4(transitive)
- Removednode-css-require@0.1.3(transitive)
Updatednode-css-require@0.1.4