Skip to content

Commit

Permalink
chore: Omit minified files and sourcesContent in published packages (
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten authored Mar 3, 2025
1 parent b7ede5a commit 573944c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .changeset/purple-baboons-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@urql/exchange-auth': patch
'@urql/exchange-context': patch
'@urql/exchange-execute': patch
'@urql/exchange-graphcache': patch
'@urql/exchange-persisted': patch
'@urql/exchange-populate': patch
'@urql/exchange-refocus': patch
'@urql/exchange-request-policy': patch
'@urql/exchange-retry': patch
'@urql/exchange-throw-on-error': patch
'@urql/core': patch
'@urql/introspection': patch
'@urql/next': patch
'@urql/preact': patch
'urql': patch
'@urql/solid': patch
'@urql/storage-rn': patch
'@urql/svelte': patch
'@urql/vue': patch
---

Omit minified files and sourcemaps' `sourcesContent` in published packages
7 changes: 4 additions & 3 deletions scripts/rollup/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import cleanup from './cleanup-plugin.mjs';
import * as settings from './settings.mjs';

const plugins = makePlugins();
const isCI = !!process.env.CI;

const chunkFileNames = extension => {
let hasDynamicChunk = false;
Expand Down Expand Up @@ -91,7 +92,7 @@ const output = ({ format, isProduction }) => {
exports: 'named',
sourcemap: true,
banner: chunk => (chunk.name === 'urql-next' ? '"use client"' : undefined),
sourcemapExcludeSources: false,
sourcemapExcludeSources: isCI,
hoistTransitiveImports: false,
indent: false,
freeze: false,
Expand Down Expand Up @@ -141,8 +142,8 @@ export default [
output: [
output({ format: 'cjs', isProduction: false }),
output({ format: 'esm', isProduction: false }),
output({ format: 'cjs', isProduction: true }),
output({ format: 'esm', isProduction: true }),
!isCI && output({ format: 'cjs', isProduction: true }),
!isCI && output({ format: 'esm', isProduction: true }),
].filter(Boolean),
},
{
Expand Down

0 comments on commit 573944c

Please sign in to comment.