Skip to content

Commit b0f3cc4

Browse files
authored
Merge pull request #144 from Andarist/preconstruct
Switch to Preconstruct
2 parents 2ddc643 + 5df1272 commit b0f3cc4

File tree

7 files changed

+938
-1534
lines changed

7 files changed

+938
-1534
lines changed

.parcelrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.prettierignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
.parcel-cache
21
dist
3-
node_modules
2+
node_modules

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve("@babel/preset-typescript")],
3+
};

package.json

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,30 @@
88
"type": "git",
99
"url": "https://github.com/bvaughn/react-error-boundary"
1010
},
11-
"source": "src/index.ts",
12-
"main": "dist/react-error-boundary.js",
13-
"module": "dist/react-error-boundary.module.js",
14-
"types": "dist/react-error-boundary.d.ts",
11+
"main": "dist/react-error-boundary.cjs.js",
12+
"module": "dist/react-error-boundary.esm.js",
13+
"exports": {
14+
".": {
15+
"types": {
16+
"import": "./dist/react-error-boundary.cjs.mjs",
17+
"default": "./dist/react-error-boundary.cjs.js"
18+
},
19+
"module": "./dist/react-error-boundary.esm.js",
20+
"import": "./dist/react-error-boundary.cjs.mjs",
21+
"default": "./dist/react-error-boundary.cjs.js"
22+
},
23+
"./package.json": "./package.json"
24+
},
25+
"types": "dist/react-error-boundary.cjs.d.ts",
1526
"files": [
1627
"dist"
1728
],
1829
"sideEffects": false,
1930
"scripts": {
20-
"clear": "npm run clear:parcel-cache & npm run clear:builds & npm run clear:node_modules",
31+
"clear": "npm run clear:builds & npm run clear:node_modules",
2132
"clear:builds": "rm -rf ./dist",
22-
"clear:parcel-cache": "rm -rf ./.parcel-cache",
2333
"clear:node_modules": "rm -rf ./node_modules",
24-
"prerelease": "rm -rf ./.parcel-cache && parcel build",
34+
"prerelease": "preconstruct build",
2535
"prettier": "prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
2636
"prettier:ci": "prettier --check \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
2737
"test": "jest",
@@ -33,19 +43,13 @@
3343
"@babel/runtime": "^7.12.5"
3444
},
3545
"devDependencies": {
36-
"@parcel/config-default": "^2.9.0",
37-
"@parcel/core": "^2.9.0",
38-
"@parcel/packager-ts": "^2.9.0",
39-
"@parcel/plugin": "^2.9.0",
40-
"@parcel/source-map": "^2.1.1",
41-
"@parcel/transformer-typescript-types": "^2.9.0",
42-
"@parcel/utils": "^2.9.0",
46+
"@babel/preset-typescript": "^7.21.5",
47+
"@preconstruct/cli": "^2.7.0",
4348
"@types/jest": "^26.0.15",
4449
"@types/react": "^18",
4550
"@types/react-dom": "^18",
4651
"jest": "^29.4.3",
4752
"jest-environment-jsdom": "^29.4.3",
48-
"parcel": "^2.9.0",
4953
"prettier": "^2.8.6",
5054
"react": "^18",
5155
"react-dom": "^18",
@@ -62,5 +66,13 @@
6266
"react/no-did-update-set-state": "off",
6367
"babel/no-unused-expressions": "off"
6468
}
69+
},
70+
"preconstruct": {
71+
"exports": {
72+
"importConditionDefaultExport": "default"
73+
},
74+
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
75+
"importsConditions": true
76+
}
6577
}
6678
}

parcel-optimizer-use-client.mjs

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)