smartbundle 0.3.0-alpha.0 → 0.3.0-alpha.2
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.
- package/__do_not_import_directly__/buildVite.cjs +1 -0
- package/__do_not_import_directly__/buildVite.js +1 -0
- package/__do_not_import_directly__/index.cjs +1 -1
- package/__do_not_import_directly__/index.js +1 -1
- package/__do_not_import_directly__/writePackageJson.cjs +15 -11
- package/__do_not_import_directly__/writePackageJson.js +15 -11
- package/package.json +3 -2
- package/src/writePackageJson.d.ts +1 -2
@@ -101,7 +101,7 @@ async function run(args) {
|
|
101
101
|
}
|
102
102
|
for (const path$1 of exportPath) {
|
103
103
|
setExports(exportsMap, path$1, (entry) => {
|
104
|
-
entry.
|
104
|
+
entry.dts = "./" + path.relative(outDir, dts);
|
105
105
|
return entry;
|
106
106
|
});
|
107
107
|
}
|
@@ -9,19 +9,23 @@ async function writePackageJson(outDir, parsed, { exportsMap }) {
|
|
9
9
|
continue;
|
10
10
|
}
|
11
11
|
const anExport = {};
|
12
|
-
if (value.
|
13
|
-
anExport.
|
14
|
-
types: value.mdts,
|
15
|
-
default: value.mjs
|
16
|
-
};
|
12
|
+
if (value.dts) {
|
13
|
+
anExport.types = value.dts;
|
17
14
|
}
|
18
|
-
if (value.
|
19
|
-
anExport.
|
20
|
-
|
21
|
-
|
22
|
-
}
|
15
|
+
if (value.mjs) {
|
16
|
+
anExport.import = {};
|
17
|
+
if (value.dts) {
|
18
|
+
anExport.import.types = value.dts;
|
19
|
+
}
|
20
|
+
anExport.import.default = value.mjs;
|
21
|
+
}
|
22
|
+
if (value.cjs) {
|
23
|
+
anExport.require = {};
|
24
|
+
if (value.dts) {
|
25
|
+
anExport.require.types = value.dts;
|
26
|
+
}
|
27
|
+
anExport.require.default = value.cjs;
|
23
28
|
}
|
24
|
-
anExport.types = value.mdts;
|
25
29
|
anExport.default = value.mjs;
|
26
30
|
allExports[key] = anExport;
|
27
31
|
}
|
@@ -7,19 +7,23 @@ async function writePackageJson(outDir, parsed, { exportsMap }) {
|
|
7
7
|
continue;
|
8
8
|
}
|
9
9
|
const anExport = {};
|
10
|
-
if (value.
|
11
|
-
anExport.
|
12
|
-
types: value.mdts,
|
13
|
-
default: value.mjs
|
14
|
-
};
|
10
|
+
if (value.dts) {
|
11
|
+
anExport.types = value.dts;
|
15
12
|
}
|
16
|
-
if (value.
|
17
|
-
anExport.
|
18
|
-
|
19
|
-
|
20
|
-
}
|
13
|
+
if (value.mjs) {
|
14
|
+
anExport.import = {};
|
15
|
+
if (value.dts) {
|
16
|
+
anExport.import.types = value.dts;
|
17
|
+
}
|
18
|
+
anExport.import.default = value.mjs;
|
19
|
+
}
|
20
|
+
if (value.cjs) {
|
21
|
+
anExport.require = {};
|
22
|
+
if (value.dts) {
|
23
|
+
anExport.require.types = value.dts;
|
24
|
+
}
|
25
|
+
anExport.require.default = value.cjs;
|
21
26
|
}
|
22
|
-
anExport.types = value.mdts;
|
23
27
|
anExport.default = value.mjs;
|
24
28
|
allExports[key] = anExport;
|
25
29
|
}
|
package/package.json
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
{
|
2
2
|
"name": "smartbundle",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.3.0-alpha.
|
4
|
+
"version": "0.3.0-alpha.2",
|
5
5
|
"bin": "./src/bin.js",
|
6
6
|
"types": "./src/run.d.ts",
|
7
7
|
"module": "./src/run.js",
|
8
8
|
"description": "",
|
9
9
|
"exports": {
|
10
10
|
".": {
|
11
|
+
"types": "./src/run.d.ts",
|
11
12
|
"import": {
|
12
13
|
"types": "./src/run.d.ts",
|
13
14
|
"default": "./src/run.js"
|
14
15
|
},
|
15
16
|
"require": {
|
17
|
+
"types": "./src/run.d.ts",
|
16
18
|
"default": "./src/run.cjs"
|
17
19
|
},
|
18
|
-
"types": "./src/run.d.ts",
|
19
20
|
"default": "./src/run.js"
|
20
21
|
}
|
21
22
|
},
|