Skip to content

Commit

Permalink
Switch to Preconstruct to enable dev bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed May 15, 2023
1 parent 5aafa03 commit 9e0b476
Show file tree
Hide file tree
Showing 3 changed files with 1,768 additions and 845 deletions.
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "react-resizable-panels-repo",
"private": true,
"workspaces": [
"packages/*"
Expand All @@ -10,13 +11,14 @@
"clear:node_modules": "rm -rf ./node_modules && rm -rf ./packages/*/node_modules",
"docs": "cd packages/react-resizable-panels-website && pnpm build",
"lint": "cd packages/react-resizable-panels && pnpm lint",
"prerelease": "rm -rf ./.parcel-cache && cd packages/react-resizable-panels && rm -rf ./dist && pnpm build",
"prerelease": "preconstruct build",
"prettier": "prettier --write \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
"prettier:ci": "prettier --check \"**/*.{css,html,js,json,jsx,ts,tsx}\"",
"typescript": "tsc --noEmit",
"typescript:watch": "tsc --noEmit --watch"
},
"devDependencies": {
"@babel/preset-typescript": "^7.21.5",
"@types/node": "^18.15.11",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
Expand All @@ -32,6 +34,21 @@
"dependencies": {
"@parcel/core": "^2.8.3",
"@parcel/packager-ts": "^2.8.3",
"@parcel/transformer-typescript-types": "^2.8.3"
"@parcel/transformer-typescript-types": "^2.8.3",
"@preconstruct/cli": "^2.6.4"
},
"preconstruct": {
"packages": [
"packages/!(react-resizable-panels-website)"
],
"globals": {
"react": "React"
},
"exports": {
"importConditionDefaultExport": "default"
},
"___experimentalFlags_WILL_CHANGE_IN_PATCH": {
"importsConditions": true
}
}
}
30 changes: 26 additions & 4 deletions packages/react-resizable-panels/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,33 @@
"url": "git+https://github.com/bvaughn/react-resizable-panels.git"
},
"source": "src/index.ts",
"main": "dist/react-resizable-panels.js",
"module": "dist/react-resizable-panels.module.js",
"types": "dist/react-resizable-panels.d.ts",
"main": "dist/react-resizable-panels.cjs.js",
"module": "dist/react-resizable-panels.esm.js",
"exports": {
".": {
"types": {
"import": "./dist/react-resizable-panels.cjs.mjs",
"default": "./dist/react-resizable-panels.cjs.js"
},
"development": {
"module": "./dist/react-resizable-panels.development.esm.js",
"import": "./dist/react-resizable-panels.development.cjs.mjs",
"default": "./dist/react-resizable-panels.development.cjs.js"
},
"module": "./dist/react-resizable-panels.esm.js",
"import": "./dist/react-resizable-panels.cjs.mjs",
"default": "./dist/react-resizable-panels.cjs.js"
},
"./package.json": "./package.json"
},
"imports": {
"#is-development": {
"development": "./src/env-conditions/development.ts",
"default": "./src/env-conditions/production.ts"
}
},
"types": "dist/react-resizable-panels.cjs.d.ts",
"scripts": {
"build": "parcel build",
"lint": "eslint \"src/**/*.{ts,tsx}\"",
"watch": "parcel watch --port=2345"
},
Expand Down
Loading

0 comments on commit 9e0b476

Please sign in to comment.