Skip to content

Commit a432635

Browse files
committed
fix: use ts file as entrypoint
1 parent 592a748 commit a432635

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

packages/scope/package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Get a scoped ID for whatever file you're in. Zero client-side JS.",
55
"type": "module",
66
"exports": {
7-
".": "./dist/index.js",
7+
".": "./src/index.ts",
88
"./types": "./ambient.d.ts"
99
},
1010
"files": ["src", "ambient.d.ts"],
@@ -13,10 +13,6 @@
1313
"url": "https://github.com/bholmesdev/simple-stack.git",
1414
"directory": "packages/scope"
1515
},
16-
"scripts": {
17-
"dev": "tsc --watch",
18-
"build": "tsc"
19-
},
2016
"dependencies": {
2117
"typescript": "^5.5.3",
2218
"vite": "^5.0.10"

packages/scope/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { createHash } from "node:crypto";
22
import type { AstroConfig } from "astro";
33
import { normalizePath } from "vite";
4+
import "../ambient.d.ts";
45

56
type VitePlugin = Required<AstroConfig["vite"]>["plugins"][number];
67

7-
import "../ambient.d.ts";
8-
98
const virtualMod = "simple:scope";
109

1110
export default function vitePluginSimpleScope(): VitePlugin {

0 commit comments

Comments
 (0)