smartbundle 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,7 +131,7 @@ async function run(args) {
|
|
131
131
|
}
|
132
132
|
for (const path of exportPath) {
|
133
133
|
setExports(exportsMap, path, (entry) => {
|
134
|
-
entry.mjs = el.fileName;
|
134
|
+
entry.mjs = "./" + el.fileName;
|
135
135
|
return entry;
|
136
136
|
});
|
137
137
|
}
|
@@ -145,7 +145,7 @@ async function run(args) {
|
|
145
145
|
}
|
146
146
|
for (const path of exportPath2) {
|
147
147
|
setExports(exportsMap, path, (entry) => {
|
148
|
-
entry.mdts = el.fileName;
|
148
|
+
entry.mdts = "./" + el.fileName;
|
149
149
|
return entry;
|
150
150
|
});
|
151
151
|
}
|
@@ -28,7 +28,8 @@ function createPackageJsonSchema(sourceDir) {
|
|
28
28
|
});
|
29
29
|
}
|
30
30
|
async function parsePackageJson({ sourceDir, packagePath }) {
|
31
|
-
const
|
31
|
+
const packageString = await fs.readFile(packagePath, "utf-8");
|
32
|
+
const rawJson = JSON.parse(packageString);
|
32
33
|
const packageJsonSchema = createPackageJsonSchema(sourceDir);
|
33
34
|
const packageJson = await packageJsonSchema.safeParseAsync(rawJson);
|
34
35
|
if (!packageJson.success) {
|
package/package.json
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "smartbundle",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
5
|
-
"bin": "src/bin.mjs",
|
6
|
-
"types": "src/run.d.ts",
|
7
|
-
"module": "src/run.mjs",
|
4
|
+
"version": "0.0.5",
|
5
|
+
"bin": "./src/bin.mjs",
|
6
|
+
"types": "./src/run.d.ts",
|
7
|
+
"module": "./src/run.mjs",
|
8
8
|
"description": "",
|
9
9
|
"exports": {
|
10
10
|
".": {
|
11
|
-
"types": "src/run.d.ts",
|
11
|
+
"types": "./src/run.d.ts",
|
12
12
|
"import": {
|
13
|
-
"types": "src/run.d.ts",
|
14
|
-
"default": "src/run.mjs"
|
13
|
+
"types": "./src/run.d.ts",
|
14
|
+
"default": "./src/run.mjs"
|
15
15
|
},
|
16
|
-
"default": "src/run.mjs"
|
16
|
+
"default": "./src/run.mjs"
|
17
17
|
}
|
18
18
|
},
|
19
19
|
"dependencies": {
|
package/src/bin.d.ts
CHANGED
package/src/bin.mjs
CHANGED