smartbundle 0.0.1 → 0.0.3
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__/index.mjs +5 -2
- package/package.json +14 -3
- package/src/bin.mjs +1 -3
- package/src/run.d.ts +1 -0
- package/src/run.mjs +6 -0
@@ -95,6 +95,9 @@ async function run(args) {
|
|
95
95
|
rollupOptions: {
|
96
96
|
plugins: [typescript],
|
97
97
|
external: (id, parentId, isResolved) => {
|
98
|
+
if (id === packageJson.name) {
|
99
|
+
return true;
|
100
|
+
}
|
98
101
|
if (id.startsWith("node:")) {
|
99
102
|
return true;
|
100
103
|
}
|
@@ -128,7 +131,7 @@ async function run(args) {
|
|
128
131
|
}
|
129
132
|
for (const path of exportPath) {
|
130
133
|
setExports(exportsMap, path, (entry) => {
|
131
|
-
entry.mjs =
|
134
|
+
entry.mjs = el.fileName;
|
132
135
|
return entry;
|
133
136
|
});
|
134
137
|
}
|
@@ -142,7 +145,7 @@ async function run(args) {
|
|
142
145
|
}
|
143
146
|
for (const path of exportPath2) {
|
144
147
|
setExports(exportsMap, path, (entry) => {
|
145
|
-
entry.mdts =
|
148
|
+
entry.mdts = el.fileName;
|
146
149
|
return entry;
|
147
150
|
});
|
148
151
|
}
|
package/package.json
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "smartbundle",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
5
|
-
"bin": "
|
4
|
+
"version": "0.0.3",
|
5
|
+
"bin": "src/bin.mjs",
|
6
|
+
"types": "src/run.d.ts",
|
7
|
+
"module": "src/run.mjs",
|
6
8
|
"description": "",
|
7
|
-
"exports": {
|
9
|
+
"exports": {
|
10
|
+
".": {
|
11
|
+
"types": "src/run.d.ts",
|
12
|
+
"import": {
|
13
|
+
"types": "src/run.d.ts",
|
14
|
+
"default": "src/run.mjs"
|
15
|
+
},
|
16
|
+
"default": "src/run.mjs"
|
17
|
+
}
|
18
|
+
},
|
8
19
|
"dependencies": {
|
9
20
|
"@rollup/plugin-typescript": "^11.1.6",
|
10
21
|
"vite": "^5.3.4",
|
package/src/bin.mjs
CHANGED
package/src/run.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export declare function main(): void;
|