Skip to content

Commit 3ac8210

Browse files
committed
fix storage export
1 parent 099a22b commit 3ac8210

File tree

8 files changed

+49
-8
lines changed

8 files changed

+49
-8
lines changed

.changeset/metal-icons-learn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"solid-js": patch
3+
---
4+
5+
fix storage export

packages/solid/package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
"web/dist",
2828
"web/types",
2929
"web/package.json",
30+
"web/storage/dist",
31+
"web/storage/types",
32+
"web/storage/package.json",
3033
"h/dist",
3134
"h/types",
3235
"h/package.json",
@@ -162,8 +165,9 @@
162165
"require": "./web/dist/web.cjs"
163166
},
164167
"./web/storage": {
165-
"import": "./web/dist/storage.js",
166-
"require": "./web/dist/storage.cjs"
168+
"types": "./web/storage/types/index.d.ts",
169+
"import": "./web/storage/dist/index.js",
170+
"require": "./web/storage/dist/index.cjs"
167171
},
168172
"./web/dist/*": "./web/dist/*",
169173
"./web/types/*": "./web/types/*",
@@ -213,7 +217,8 @@
213217
"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",
214218
"types:src": "tsc --project ./tsconfig.build.json && ncp ../../node_modules/dom-expressions/src/jsx.d.ts ./types/jsx.d.ts",
215219
"types:web": "tsc --project ./web/tsconfig.build.json",
216-
"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",
220+
"types:web-storage": "tsc --project ./web/storage/tsconfig.build.json",
221+
"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",
217222
"types:store": "tsc --project ./store/tsconfig.build.json",
218223
"types:html": "tsc --project ./html/tsconfig.json && ncp ../../node_modules/lit-dom-expressions/types/index.d.ts ./html/types/lit.d.ts",
219224
"types:h": "tsc --project ./h/tsconfig.json && ncp ../../node_modules/hyper-dom-expressions/types/index.d.ts ./h/types/hyperscript.d.ts",

packages/solid/rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ export default [
173173
plugins: [replaceDev(true)].concat(plugins)
174174
},
175175
{
176-
input: "web/storage/storage.ts",
176+
input: "web/storage/src/index.ts",
177177
output: [
178178
{
179-
file: "web/dist/storage.cjs",
179+
file: "web/storage/dist/storage.cjs",
180180
format: "cjs",
181181
exports: "auto"
182182
},
183183
{
184-
file: "web/dist/storage.js",
184+
file: "web/storage/dist/storage.js",
185185
format: "es"
186186
}
187187
],
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "solid-js/web/storage",
3+
"main": "./dist/storage.cjs",
4+
"module": "./dist/storage.js",
5+
"types": "./types/index.d.ts",
6+
"type": "module",
7+
"sideEffects": false,
8+
"exports": {
9+
".": {
10+
"types": "./types/index.d.ts",
11+
"import": "./dist/storage.js",
12+
"require": "./dist/storage.cjs"
13+
}
14+
}
15+
}

packages/solid/web/storage/storage.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "../../../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "./types",
5+
"baseUrl": "src",
6+
"paths": {
7+
"solid-js": ["../../.."],
8+
"solid-js/web": ["../.."],
9+
"solid-js/jsx-runtime": ["../../../src/jsx"],
10+
"solid-js/jsx-dev-runtime": ["../../../src/jsx"],
11+
}
12+
},
13+
"include": ["./src"]
14+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./tsconfig.build.json",
3+
"include": ["./src"]
4+
}

0 commit comments

Comments
 (0)