Skip to content

Commit

Permalink
fix(theme-ui): generate missing exports field
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Feb 19, 2024
1 parent 8cbc7ec commit ead4400
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@theme-ui/monorepo",
"version": "0.16.2-scale-tuples.0",
"version": "0.16.2-develop.1",
"private": true,
"scripts": {
"build": "preconstruct build",
Expand Down
5 changes: 4 additions & 1 deletion packages/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
"exports": {
".": {
"module": {
"worker": "./dist/theme-ui-css.worker.esm.js",
"browser": "./dist/theme-ui-css.browser.esm.js",
"default": "./dist/theme-ui-css.esm.js"
},
"default": "./dist/theme-ui-css.cjs.js"
},
"./utils": {
"module": {
"worker": "./utils/dist/theme-ui-css-utils.worker.esm.js",
"browser": "./utils/dist/theme-ui-css-utils.browser.esm.js",
"default": "./utils/dist/theme-ui-css-utils.esm.js"
},
Expand Down Expand Up @@ -50,7 +52,8 @@
],
"exports": {
"envConditions": [
"browser"
"browser",
"worker"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/pages/readme.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
title: 'Readme'
---

import Readme from 'theme-ui/README.md'
import Readme from '../../../theme-ui/README.md'

<Readme />
4 changes: 3 additions & 1 deletion packages/gatsby-plugin-theme-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"exports": {
".": {
"module": {
"worker": "./dist/gatsby-plugin-theme-ui.worker.esm.js",
"browser": "./dist/gatsby-plugin-theme-ui.browser.esm.js",
"default": "./dist/gatsby-plugin-theme-ui.esm.js"
},
Expand Down Expand Up @@ -50,7 +51,8 @@
"preconstruct": {
"exports": {
"envConditions": [
"browser"
"browser",
"worker"
]
}
}
Expand Down
3 changes: 3 additions & 0 deletions packages/theme-ui/jsx-dev-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"main": "dist/theme-ui-jsx-dev-runtime.cjs.js",
"module": "dist/theme-ui-jsx-dev-runtime.esm.js",
"browser": {
"./dist/theme-ui-jsx-dev-runtime.esm.js": "./dist/theme-ui-jsx-dev-runtime.browser.esm.js"
},
"types": "dist/theme-ui-jsx-dev-runtime.cjs.d.ts"
}
3 changes: 3 additions & 0 deletions packages/theme-ui/jsx-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"main": "dist/theme-ui-jsx-runtime.cjs.js",
"module": "dist/theme-ui-jsx-runtime.esm.js",
"browser": {
"./dist/theme-ui-jsx-runtime.esm.js": "./dist/theme-ui-jsx-runtime.browser.esm.js"
},
"types": "dist/theme-ui-jsx-runtime.cjs.d.ts"
}
36 changes: 36 additions & 0 deletions packages/theme-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@
"source": "src/index.ts",
"main": "dist/theme-ui.cjs.js",
"module": "dist/theme-ui.esm.js",
"browser": {
"./dist/theme-ui.esm.js": "./dist/theme-ui.browser.esm.js"
},
"exports": {
".": {
"module": {
"worker": "./dist/theme-ui.worker.esm.js",
"browser": "./dist/theme-ui.browser.esm.js",
"default": "./dist/theme-ui.esm.js"
},
"default": "./dist/theme-ui.cjs.js"
},
"./jsx-runtime": {
"module": {
"worker": "./jsx-runtime/dist/theme-ui-jsx-runtime.worker.esm.js",
"browser": "./jsx-runtime/dist/theme-ui-jsx-runtime.browser.esm.js",
"default": "./jsx-runtime/dist/theme-ui-jsx-runtime.esm.js"
},
"default": "./jsx-runtime/dist/theme-ui-jsx-runtime.cjs.js"
},
"./jsx-dev-runtime": {
"module": {
"worker": "./jsx-dev-runtime/dist/theme-ui-jsx-dev-runtime.worker.esm.js",
"browser": "./jsx-dev-runtime/dist/theme-ui-jsx-dev-runtime.browser.esm.js",
"default": "./jsx-dev-runtime/dist/theme-ui-jsx-dev-runtime.esm.js"
},
"default": "./jsx-dev-runtime/dist/theme-ui-jsx-dev-runtime.cjs.js"
},
"./package.json": "./package.json"
},
"types": "dist/theme-ui.cjs.d.ts",
"sideEffects": false,
"author": "Brent Jackson <[email protected]>",
Expand Down Expand Up @@ -39,6 +69,12 @@
"css-in-js"
],
"preconstruct": {
"exports": {
"envConditions": [
"browser",
"worker"
]
},
"entrypoints": [
"index.ts",
"jsx-dev-runtime.ts",
Expand Down
11 changes: 4 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ead4400

Please sign in to comment.