@sanity/pkg-utils 7.9.21 → 7.9.23

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.
@@ -1398,7 +1398,9 @@ function resolveRollupConfig(ctx, buildTask) {
1398
1398
  treeshake: {
1399
1399
  preset: "recommended",
1400
1400
  propertyReadSideEffects: !1,
1401
- moduleSideEffects: "no-external",
1401
+ // If the module ends with `.css` it is considered to be a side effect, even if the module is marked as no side effect,
1402
+ // this option used to be `moduleSideEffects: 'no-external'`, and thus if it's not CSS it uses `!external`, which is equivalent to `'no-external'`
1403
+ moduleSideEffects: (id, external2) => id.endsWith(".css") ? !0 : !external2,
1402
1404
  annotations: !0,
1403
1405
  ...config2?.rollup?.treeshake
1404
1406
  },
@@ -1651,6 +1653,8 @@ async function checkExports(exportPaths, options) {
1651
1653
  // otherwise output maps to stdout as we're using stdin
1652
1654
  outfile: "/dev/null",
1653
1655
  platform: "node",
1656
+ // We're not interested in CSS files that might be imported as a side effect, so we'll treat them as empty
1657
+ loader: { ".css": "empty" },
1654
1658
  stdin: {
1655
1659
  contents: code,
1656
1660
  loader: "js",