Skip to content

Commit

Permalink
Add CommonJS export conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonmade committed Aug 13, 2024
1 parent 61de49b commit 7d48d99
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 17 deletions.
9 changes: 9 additions & 0 deletions .changeset/yellow-comics-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@remote-dom/polyfill': minor
'@remote-dom/signals': minor
'@remote-dom/preact': minor
'@remote-dom/react': minor
'@remote-dom/core': minor
---

Add CommonJS export conditions
12 changes: 8 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,29 @@
"types": "./build/typescript/elements.d.ts",
"quilt:source": "./source/elements.ts",
"quilt:esnext": "./build/esnext/elements.esnext",
"import": "./build/esm/elements.mjs"
"import": "./build/esm/elements.mjs",
"require": "./build/cjs/elements.cjs"
},
"./html": {
"types": "./build/typescript/html.d.ts",
"quilt:source": "./source/html.ts",
"quilt:esnext": "./build/esnext/html.esnext",
"import": "./build/esm/html.mjs"
"import": "./build/esm/html.mjs",
"require": "./build/cjs/html.cjs"
},
"./polyfill": {
"types": "./build/typescript/polyfill.d.ts",
"quilt:source": "./source/polyfill.ts",
"quilt:esnext": "./build/esnext/polyfill.esnext",
"import": "./build/esm/polyfill.mjs"
"import": "./build/esm/polyfill.mjs",
"require": "./build/cjs/polyfill.cjs"
},
"./receivers": {
"types": "./build/typescript/receivers.d.ts",
"quilt:source": "./source/receivers.ts",
"quilt:esnext": "./build/esnext/receivers.esnext",
"import": "./build/esm/receivers.mjs"
"import": "./build/esm/receivers.mjs",
"require": "./build/cjs/receivers.cjs"
}
},
"types": "./build/typescript/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import {quiltPackage} from '@quilted/rollup/package';

export default quiltPackage();
export default quiltPackage({commonjs: true});
3 changes: 2 additions & 1 deletion packages/polyfill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"types": "./build/typescript/index.d.ts",
"quilt:source": "./source/index.ts",
"quilt:esnext": "./build/esnext/index.esnext",
"import": "./build/esm/index.mjs"
"import": "./build/esm/index.mjs",
"require": "./build/cjs/index.cjs"
}
},
"types": "./build/typescript/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/polyfill/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import {quiltPackage} from '@quilted/rollup/package';

export default quiltPackage();
export default quiltPackage({commonjs: true});
9 changes: 6 additions & 3 deletions packages/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@
"types": "./build/typescript/index.d.ts",
"quilt:source": "./source/index.ts",
"quilt:esnext": "./build/esnext/index.esnext",
"import": "./build/esm/index.mjs"
"import": "./build/esm/index.mjs",
"require": "./build/cjs/index.cjs"
},
"./host": {
"types": "./build/typescript/host.d.ts",
"quilt:source": "./source/host.ts",
"quilt:esnext": "./build/esnext/host.esnext",
"import": "./build/esm/host.mjs"
"import": "./build/esm/host.mjs",
"require": "./build/cjs/host.cjs"
},
"./html": {
"types": "./build/typescript/html.d.ts",
"quilt:source": "./source/html.ts",
"quilt:esnext": "./build/esnext/html.esnext",
"import": "./build/esm/html.mjs"
"import": "./build/esm/html.mjs",
"require": "./build/cjs/html.cjs"
}
},
"types": "./build/typescript/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/preact/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import {quiltPackage} from '@quilted/rollup/package';

export default quiltPackage({
react: 'preact',
commonjs: true,
});
12 changes: 8 additions & 4 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,29 @@
"types": "./build/typescript/index.d.ts",
"quilt:source": "./source/index.ts",
"quilt:esnext": "./build/esnext/index.esnext",
"import": "./build/esm/index.mjs"
"import": "./build/esm/index.mjs",
"require": "./build/cjs/index.cjs"
},
"./host": {
"types": "./build/typescript/host.d.ts",
"quilt:source": "./source/host.ts",
"quilt:esnext": "./build/esnext/host.esnext",
"import": "./build/esm/host.mjs"
"import": "./build/esm/host.mjs",
"require": "./build/cjs/host.cjs"
},
"./html": {
"types": "./build/typescript/html.d.ts",
"quilt:source": "./source/html.ts",
"quilt:esnext": "./build/esnext/html.esnext",
"import": "./build/esm/html.mjs"
"import": "./build/esm/html.mjs",
"require": "./build/cjs/html.cjs"
},
"./polyfill": {
"types": "./build/typescript/polyfill.d.ts",
"quilt:source": "./source/polyfill.ts",
"quilt:esnext": "./build/esnext/polyfill.esnext",
"import": "./build/esm/polyfill.mjs"
"import": "./build/esm/polyfill.mjs",
"require": "./build/cjs/polyfill.cjs"
}
},
"types": "./build/typescript/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import {quiltPackage} from '@quilted/rollup/package';

export default quiltPackage();
export default quiltPackage({commonjs: true});
3 changes: 2 additions & 1 deletion packages/signals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"types": "./build/typescript/index.d.ts",
"quilt:source": "./source/index.ts",
"quilt:esnext": "./build/esnext/index.esnext",
"import": "./build/esm/index.mjs"
"import": "./build/esm/index.mjs",
"require": "./build/cjs/index.cjs"
}
},
"types": "./build/typescript/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/signals/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import {quiltPackage} from '@quilted/rollup/package';

export default quiltPackage();
export default quiltPackage({commonjs: true});

0 comments on commit 7d48d99

Please sign in to comment.