@jobber/components 6.60.1 → 6.60.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.60.1",
3
+ "version": "6.60.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -452,7 +452,9 @@
452
452
  }
453
453
  },
454
454
  "scripts": {
455
- "build": "rollup --config",
455
+ "build": "npm run build:pre && rollup --config && npm run build:post",
456
+ "build:pre": "PREBUILD_CSS=true rollup --config && cp dist/styles.css ./styles.css.backup && npm run clean",
457
+ "build:post": "mv ./styles.css.backup dist/styles.css",
456
458
  "bootstrap": "npm run clean; npm run build",
457
459
  "clean": "rm -rf dist/* tsconfig.rollup.tsbuildinfo",
458
460
  "entryPoints:build": "ts-node --project ../../tsconfig.bin.json ../../scripts/entryPoints.ts",
@@ -540,5 +542,5 @@
540
542
  "> 1%",
541
543
  "IE 10"
542
544
  ],
543
- "gitHead": "edd0e26a0ca33260d3fd4e38fa0531861b202162"
545
+ "gitHead": "f4db6c1192c2f62b4d41eb1e0ee1a6a40fac6cfe"
544
546
  }
package/rollup.config.mjs CHANGED
@@ -16,8 +16,19 @@ import alias from "@rollup/plugin-alias";
16
16
  // comments for manual release
17
17
  const __filename = fileURLToPath(import.meta.url);
18
18
  const __dirname = dirname(__filename);
19
+
20
+ /**
21
+ * When PREBUILD_CSS is supplied, only build the main index.ts file.
22
+ * This ensures postcss maintains consistent ordering of styles across builds.
23
+ *
24
+ * Using multiInput (input with globs) produces inconsistent ordering within styles.css
25
+ * because files are loaded in a non-deterministic order, and postcss bundles them in
26
+ * that order.
27
+ */
28
+ const PREBUILD_CSS = process.env.PREBUILD_CSS === "true";
29
+
19
30
  export default {
20
- input: `src/**/index.{ts,tsx}`,
31
+ input: PREBUILD_CSS ? "src/index.ts" : `src/**/index.{ts,tsx}`,
21
32
  plugins: [
22
33
  nodePolyfills(),
23
34
  alias({