Skip to content

Commit

Permalink
Upgrade tsup to support --inject (aws-amplify#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons authored Dec 27, 2021
1 parent 119d0c8 commit ebbae0e
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 114 deletions.
4 changes: 0 additions & 4 deletions .husky/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@

yarn install
yarn build

# React's build doesn't pick up on patch changes, so we need to run it twice
yarn patch-package
yarn react build
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"private": true,
"scripts": {
"postinstall": "patch-package",
"build": "npx ultra -r --filter '@aws-amplify/*' build",
"angular": "yarn workspace @aws-amplify/ui-angular",
"react": "yarn workspace @aws-amplify/ui-react",
Expand Down Expand Up @@ -41,17 +40,13 @@
"vscode-vue-languageservice": "0.27.26",
"ws": "^7.4.6"
},
"dependencies": {
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"tsup": "^4.14.0"
},
"devDependencies": {
"@changesets/cli": "^2.16.0",
"@changesets/changelog-github": "0.4.1",
"@changesets/cli": "^2.16.0",
"husky": ">=6",
"lint-staged": ">=10",
"prettier": "2.4.1",
"tsup": "^5.11.9",
"ultra-runner": "^3.10.5",
"wait-on": "^6.0.0"
},
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/react/tsup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
// `aws-amplify` is external, but sub-dependencies weren't automatically externalized ("require" statements were included)
external: ['aws-amplify', /^@aws-amplify\//],
format: ['cjs', 'esm'],
inject: ['src/react-shim.js'],
// ! .cjs/.mjs doesn't work with Angular's webpack4 config by default!
legacyOutput: true,
sourcemap: 'external',
Expand Down
9 changes: 0 additions & 9 deletions packages/ui/src/globals.js

This file was deleted.

13 changes: 0 additions & 13 deletions patches/klaw-sync+6.0.0.patch

This file was deleted.

12 changes: 0 additions & 12 deletions patches/tsup+4.14.0.patch

This file was deleted.

209 changes: 140 additions & 69 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit ebbae0e

Please sign in to comment.