Skip to content

Commit

Permalink
fix storage export
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Feb 5, 2024
1 parent 099a22b commit 3ac8210
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-icons-learn.md
@@ -0,0 +1,5 @@
---
"solid-js": patch
---

fix storage export
11 changes: 8 additions & 3 deletions packages/solid/package.json
Expand Up @@ -27,6 +27,9 @@
"web/dist",
"web/types",
"web/package.json",
"web/storage/dist",
"web/storage/types",
"web/storage/package.json",
"h/dist",
"h/types",
"h/package.json",
Expand Down Expand Up @@ -162,8 +165,9 @@
"require": "./web/dist/web.cjs"
},
"./web/storage": {
"import": "./web/dist/storage.js",
"require": "./web/dist/storage.cjs"
"types": "./web/storage/types/index.d.ts",
"import": "./web/storage/dist/index.js",
"require": "./web/storage/dist/index.cjs"
},
"./web/dist/*": "./web/dist/*",
"./web/types/*": "./web/types/*",
Expand Down Expand Up @@ -213,7 +217,8 @@
"types:copy": "ncp ../../node_modules/dom-expressions/src/jsx.d.ts ./src/jsx.d.ts && ncp ../../node_modules/dom-expressions/src/jsx-h.d.ts ./h/jsx-runtime/src/jsx.d.ts",
"types:src": "tsc --project ./tsconfig.build.json && ncp ../../node_modules/dom-expressions/src/jsx.d.ts ./types/jsx.d.ts",
"types:web": "tsc --project ./web/tsconfig.build.json",
"types:copy-web": "ncp ../../node_modules/dom-expressions/src/client.d.ts ./web/types/client.d.ts && ncp ../../node_modules/dom-expressions/src/server.d.ts ./web/types/server.d.ts && ncp ./web/storage/storage.d.ts ./web/types/storage.d.ts",
"types:web-storage": "tsc --project ./web/storage/tsconfig.build.json",
"types:copy-web": "ncp ../../node_modules/dom-expressions/src/client.d.ts ./web/types/client.d.ts && ncp ../../node_modules/dom-expressions/src/server.d.ts ./web/types/server.d.ts",
"types:store": "tsc --project ./store/tsconfig.build.json",
"types:html": "tsc --project ./html/tsconfig.json && ncp ../../node_modules/lit-dom-expressions/types/index.d.ts ./html/types/lit.d.ts",
"types:h": "tsc --project ./h/tsconfig.json && ncp ../../node_modules/hyper-dom-expressions/types/index.d.ts ./h/types/hyperscript.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/solid/rollup.config.js
Expand Up @@ -173,15 +173,15 @@ export default [
plugins: [replaceDev(true)].concat(plugins)
},
{
input: "web/storage/storage.ts",
input: "web/storage/src/index.ts",
output: [
{
file: "web/dist/storage.cjs",
file: "web/storage/dist/storage.cjs",
format: "cjs",
exports: "auto"
},
{
file: "web/dist/storage.js",
file: "web/storage/dist/storage.js",
format: "es"
}
],
Expand Down
15 changes: 15 additions & 0 deletions packages/solid/web/storage/package.json
@@ -0,0 +1,15 @@
{
"name": "solid-js/web/storage",
"main": "./dist/storage.cjs",
"module": "./dist/storage.js",
"types": "./types/index.d.ts",
"type": "module",
"sideEffects": false,
"exports": {
".": {
"types": "./types/index.d.ts",
"import": "./dist/storage.js",
"require": "./dist/storage.cjs"
}
}
}
File renamed without changes.
2 changes: 0 additions & 2 deletions packages/solid/web/storage/storage.d.ts

This file was deleted.

14 changes: 14 additions & 0 deletions packages/solid/web/storage/tsconfig.build.json
@@ -0,0 +1,14 @@
{
"extends": "../../../../tsconfig.json",
"compilerOptions": {
"outDir": "./types",
"baseUrl": "src",
"paths": {
"solid-js": ["../../.."],
"solid-js/web": ["../.."],
"solid-js/jsx-runtime": ["../../../src/jsx"],
"solid-js/jsx-dev-runtime": ["../../../src/jsx"],
}
},
"include": ["./src"]
}
4 changes: 4 additions & 0 deletions packages/solid/web/storage/tsconfig.json
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.build.json",
"include": ["./src"]
}

0 comments on commit 3ac8210

Please sign in to comment.