rebuildjs 0.15.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/css/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  import type { Plugin } from 'esbuild'
2
2
  export declare function cssjs_esbuild_plugin_():Plugin
3
+ export declare function var__css__replace(css:string, ..._var_R_a:Record<string, string>[]):string
package/css/index.js CHANGED
@@ -18,3 +18,18 @@ export function cssjs_esbuild_plugin_() {
18
18
  },
19
19
  }
20
20
  }
21
+ /**
22
+ * @param {string}css
23
+ * @param {Record<string, string>}_var_R_a
24
+ * @returns {string}
25
+ */
26
+ export function var__css__replace(css, ..._var_R_a) {
27
+ const var_R = _var_R_a.reduce((
28
+ var_R,
29
+ _var_R
30
+ )=>({
31
+ ...var_R,
32
+ ..._var_R,
33
+ }), {})
34
+ return css.replaceAll(/var\(([^)]*)\)/g, (_, $)=>var_R[$])
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebuildjs",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "Reactive esbuild...simple hackable alternative to vite for Multi Page Apps",
5
5
  "keywords": [
6
6
  "reactive",