Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) - Fix development build being overwritten by production build #1097

Merged
merged 2 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/wet-onions-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@urql/exchange-graphcache': patch
'@urql/exchange-persisted-fetch': patch
'@urql/exchange-multipart-fetch': patch
'@urql/exchange-retry': patch
'@urql/core': patch
'@urql/preact': patch
'urql': patch
---

Fix the production build overwriting the development build. Specifically in the previous release we mistakenly replaced all development bundles with production bundles. This doesn't have any direct influence on how these packages work, but prevented development warnings from being logged or full errors from being thrown.
2 changes: 1 addition & 1 deletion exchanges/graphcache/default-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"./package.json": "./package.json"
},
"dependencies": {
"@urql/core": ">=1.13.1",
"@urql/core": ">=1.14.0",
"wonka": "^4.0.14"
}
}
5 changes: 4 additions & 1 deletion scripts/rollup/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ const output = ({ format, isProduction }) => {
if (format !== 'cjs' && format !== 'esm')
throw new Error('Invalid option `format` at output({ ... })');

const extension = format === 'esm'
let extension = format === 'esm'
? (settings.hasReact ? '.es.js' : '.mjs')
: '.js';
if (isProduction) {
extension = '.min' + extension;
}

return {
chunkFileNames: '[hash]' + extension,
Expand Down