@sanity/pkg-utils 7.9.22 → 7.9.24

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
  },
@@ -1415,6 +1417,7 @@ function resolveRollupConfig(ctx, buildTask) {
1415
1417
  sourcemap: config2?.sourcemap ?? !0,
1416
1418
  hoistTransitiveImports: !1,
1417
1419
  minifyInternalExports: minify,
1420
+ assetFileNames: "[name][extname]",
1418
1421
  ...config2?.rollup?.output
1419
1422
  }
1420
1423
  };
@@ -1651,6 +1654,8 @@ async function checkExports(exportPaths, options) {
1651
1654
  // otherwise output maps to stdout as we're using stdin
1652
1655
  outfile: "/dev/null",
1653
1656
  platform: "node",
1657
+ // We're not interested in CSS files that might be imported as a side effect, so we'll treat them as empty
1658
+ loader: { ".css": "empty" },
1654
1659
  stdin: {
1655
1660
  contents: code,
1656
1661
  loader: "js",