@bamboocss/vite 1.20.4 → 1.21.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/dist/index.cjs CHANGED
@@ -1519,7 +1519,7 @@ const formatSkipped = (id, skipped) => {
1519
1519
  * with no matching rule.
1520
1520
  */
1521
1521
  const bamboocss = (options = {}) => {
1522
- const { transform = false, partial, configPath, cwd, reportSkipped = false, reportSummary = true } = options;
1522
+ const { transform = true, partial, configPath, cwd, reportSkipped = false, reportSummary = true } = options;
1523
1523
  /** Totals across the build, for the summary. */
1524
1524
  const totals = {
1525
1525
  folded: 0,
package/dist/index.d.cts CHANGED
@@ -101,9 +101,18 @@ interface BambooVitePluginOptions {
101
101
  * Rewrite statically-resolvable `css()` and pattern calls into literal class
102
102
  * strings, so they cost nothing at runtime.
103
103
  *
104
- * Off by default, and build-only — see the "Source transformation" guide for why.
104
+ * On by default, and build-only — it never runs in `vite dev`, where the parse would land
105
+ * on every hot update and a dev bundle gains nothing from pre-resolved calls.
105
106
  *
106
- * @default false
107
+ * What it buys is per-call CPU, not bytes: the runtime still ships, because dropping it
108
+ * needs *every* call site in the graph to fold. Bundle size moves slightly against you —
109
+ * measured at -0.8% raw and +1.0% gzipped on `sandbox/runtime-perf`, since distinct class
110
+ * literals compress worse than the repeated `css({ … })` calls they replace. Set it to
111
+ * `false` if that trade is the wrong way round for you, or to keep builds faster: folding
112
+ * re-parses each module with `ts-morph`, roughly 0.3ms for a small component and 3ms for a
113
+ * 147-line file with 24 call sites.
114
+ *
115
+ * @default true
107
116
  */
108
117
  transform?: boolean;
109
118
  /**
package/dist/index.d.mts CHANGED
@@ -101,9 +101,18 @@ interface BambooVitePluginOptions {
101
101
  * Rewrite statically-resolvable `css()` and pattern calls into literal class
102
102
  * strings, so they cost nothing at runtime.
103
103
  *
104
- * Off by default, and build-only — see the "Source transformation" guide for why.
104
+ * On by default, and build-only — it never runs in `vite dev`, where the parse would land
105
+ * on every hot update and a dev bundle gains nothing from pre-resolved calls.
105
106
  *
106
- * @default false
107
+ * What it buys is per-call CPU, not bytes: the runtime still ships, because dropping it
108
+ * needs *every* call site in the graph to fold. Bundle size moves slightly against you —
109
+ * measured at -0.8% raw and +1.0% gzipped on `sandbox/runtime-perf`, since distinct class
110
+ * literals compress worse than the repeated `css({ … })` calls they replace. Set it to
111
+ * `false` if that trade is the wrong way round for you, or to keep builds faster: folding
112
+ * re-parses each module with `ts-morph`, roughly 0.3ms for a small component and 3ms for a
113
+ * 147-line file with 24 call sites.
114
+ *
115
+ * @default true
107
116
  */
108
117
  transform?: boolean;
109
118
  /**
package/dist/index.mjs CHANGED
@@ -1492,7 +1492,7 @@ const formatSkipped = (id, skipped) => {
1492
1492
  * with no matching rule.
1493
1493
  */
1494
1494
  const bamboocss = (options = {}) => {
1495
- const { transform = false, partial, configPath, cwd, reportSkipped = false, reportSummary = true } = options;
1495
+ const { transform = true, partial, configPath, cwd, reportSkipped = false, reportSummary = true } = options;
1496
1496
  /** Totals across the build, for the summary. */
1497
1497
  const totals = {
1498
1498
  folded: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/vite",
3
- "version": "1.20.4",
3
+ "version": "1.21.0",
4
4
  "description": "Vite integration for Bamboo CSS",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -35,18 +35,18 @@
35
35
  "dependencies": {
36
36
  "magic-string": "0.30.21",
37
37
  "ts-morph": "28.0.0",
38
- "@bamboocss/extractor": "1.20.4",
39
- "@bamboocss/logger": "1.20.4",
40
- "@bamboocss/core": "1.20.4",
41
- "@bamboocss/config": "1.20.4",
42
- "@bamboocss/node": "1.20.4",
43
- "@bamboocss/shared": "1.20.4",
44
- "@bamboocss/types": "1.20.4"
38
+ "@bamboocss/config": "1.21.0",
39
+ "@bamboocss/core": "1.21.0",
40
+ "@bamboocss/extractor": "1.21.0",
41
+ "@bamboocss/logger": "1.21.0",
42
+ "@bamboocss/node": "1.21.0",
43
+ "@bamboocss/shared": "1.21.0",
44
+ "@bamboocss/types": "1.21.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@jridgewell/trace-mapping": "^0.3.31",
48
48
  "vite": "7.2.6",
49
- "@bamboocss/fixture": "1.20.4"
49
+ "@bamboocss/fixture": "1.21.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "vite": ">=5"