Skip to content

Commit 4059251

Browse files
authored
fix(packaging): include runtime files in tarball (#10)
1 parent 3f7077c commit 4059251

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/workflows/pkg.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ jobs:
2020
- run: pnpm install
2121
- run: pnpm dev:prepare
2222
- run: pnpm prepack
23+
- name: verify packed runtime files
24+
run: |
25+
test ! -L dist/runtime
26+
test -f dist/runtime/composables/useSafeRuntimeConfig.js
27+
test -f dist/runtime/utils/transform.js
2328
- run: pnpm dlx pkg-pr-new publish --pnpm

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ export function getPrivateConfig() {
155155
}
156156
```
157157

158+
If your editor runs type-checking outside Nuxt's auto-import context, import it explicitly:
159+
160+
```ts
161+
import { useSafeRuntimeConfig } from '#imports'
162+
```
163+
158164
## Configuration Options
159165

160166
| Option | Type | Default | Description |

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"dist"
3939
],
4040
"scripts": {
41-
"prepack": "nuxt-module-build build && unbuild",
41+
"clean:dist": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
42+
"prepack": "pnpm clean:dist && nuxt-module-build build && unbuild",
4243
"dev": "nuxi dev playground",
4344
"dev:build": "nuxi build playground",
4445
"dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",

0 commit comments

Comments
 (0)