makepack 1.7.22 → 1.7.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makepack",
3
- "version": "1.7.22",
3
+ "version": "1.7.23",
4
4
  "type": "module",
5
5
  "description": "A CLI tool to create, build, and manage JavaScript, TypeScript, React, and React-TypeScript libraries for npm projects.",
6
6
  "categories": [
@@ -104,6 +104,21 @@ async function bundler(args, spinner, child = false) {
104
104
  const viteRollupConfig = viteConfig?.build?.rollupOptions || {};
105
105
  Object.assign(rollupConfig || {}, viteRollupConfig);
106
106
 
107
+ if (!child && rollupConfig && rollupConfig.input) {
108
+ const mapentries = mapEntriesToOutdirs(rollupConfig.input, rootdir, outdir)
109
+ if (mapentries.length > 1) {
110
+ spinner.text = `📦 Bundling ${mapentries.length} entries...`;
111
+ }
112
+
113
+ for (const { entry } of mapentries) {
114
+ await bundler({
115
+ ...args,
116
+ entry,
117
+ outdir,
118
+ }, spinner, true);
119
+ }
120
+ }
121
+
107
122
  const config = {
108
123
  ...rollupConfig,
109
124
  input: args.entry,
@@ -182,29 +197,14 @@ async function bundler(args, spinner, child = false) {
182
197
  });
183
198
  }
184
199
 
200
+
201
+
185
202
  for (const output of outputs) {
186
203
  await bundle.write(output);
187
204
  }
188
205
 
189
206
  await bundle.close();
190
207
 
191
-
192
- if (!child && rollupConfig && rollupConfig.input) {
193
- const mapentries = mapEntriesToOutdirs(rollupConfig.input, rootdir, outdir)
194
- if (mapentries.length > 1) {
195
- spinner.text = `📦 Bundling ${mapentries.length} entries...`;
196
- }
197
-
198
- for (const { entry } of mapentries) {
199
- await bundler({
200
- ...args,
201
- entry,
202
- outdir,
203
- }, spinner, true);
204
- }
205
-
206
- }
207
-
208
208
  // --------------------- Copy assets ---------------------
209
209
  if (!child) {
210
210
  spinner.text = "📁 Copying non-code assets...";