Skip to content

Commit 573944c

Browse files
authored
chore: Omit minified files and sourcesContent in published packages (#3755)
1 parent b7ede5a commit 573944c

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

.changeset/purple-baboons-nail.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@urql/exchange-auth': patch
3+
'@urql/exchange-context': patch
4+
'@urql/exchange-execute': patch
5+
'@urql/exchange-graphcache': patch
6+
'@urql/exchange-persisted': patch
7+
'@urql/exchange-populate': patch
8+
'@urql/exchange-refocus': patch
9+
'@urql/exchange-request-policy': patch
10+
'@urql/exchange-retry': patch
11+
'@urql/exchange-throw-on-error': patch
12+
'@urql/core': patch
13+
'@urql/introspection': patch
14+
'@urql/next': patch
15+
'@urql/preact': patch
16+
'urql': patch
17+
'@urql/solid': patch
18+
'@urql/storage-rn': patch
19+
'@urql/svelte': patch
20+
'@urql/vue': patch
21+
---
22+
23+
Omit minified files and sourcemaps' `sourcesContent` in published packages

scripts/rollup/config.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import cleanup from './cleanup-plugin.mjs';
88
import * as settings from './settings.mjs';
99

1010
const plugins = makePlugins();
11+
const isCI = !!process.env.CI;
1112

1213
const chunkFileNames = extension => {
1314
let hasDynamicChunk = false;
@@ -91,7 +92,7 @@ const output = ({ format, isProduction }) => {
9192
exports: 'named',
9293
sourcemap: true,
9394
banner: chunk => (chunk.name === 'urql-next' ? '"use client"' : undefined),
94-
sourcemapExcludeSources: false,
95+
sourcemapExcludeSources: isCI,
9596
hoistTransitiveImports: false,
9697
indent: false,
9798
freeze: false,
@@ -141,8 +142,8 @@ export default [
141142
output: [
142143
output({ format: 'cjs', isProduction: false }),
143144
output({ format: 'esm', isProduction: false }),
144-
output({ format: 'cjs', isProduction: true }),
145-
output({ format: 'esm', isProduction: true }),
145+
!isCI && output({ format: 'cjs', isProduction: true }),
146+
!isCI && output({ format: 'esm', isProduction: true }),
146147
].filter(Boolean),
147148
},
148149
{

0 commit comments

Comments
 (0)