makepack 1.7.5 → 1.7.6

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.5",
3
+ "version": "1.7.6",
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": [
@@ -28,7 +28,10 @@ async function bind(args, spinner) {
28
28
  },
29
29
  plugins: [
30
30
  json(),
31
- resolve(),
31
+ resolve({
32
+ extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.mjs', '.cjs'],
33
+ browser: false
34
+ }),
32
35
  commonjs(),
33
36
  isTs ? typescript({
34
37
  target: "ES2017",
@@ -79,6 +82,20 @@ async function bind(args, spinner) {
79
82
  outputOptions = [esm];
80
83
  } else if (args.format === "cjs") {
81
84
  outputOptions = [cjs];
85
+ } else if (args.format === "iife") {
86
+ outputOptions = [{
87
+ ...esm,
88
+ format: "iife",
89
+ name: args.name || path.basename(args.entry, path.extname(args.entry)),
90
+ entryFileNames: '[name].js',
91
+ }];
92
+ } else if (args.format === "umd") {
93
+ outputOptions = [{
94
+ ...esm,
95
+ format: "umd",
96
+ name: args.name || path.basename(args.entry, path.extname(args.entry)),
97
+ entryFileNames: '[name].js',
98
+ }];
82
99
  }
83
100
 
84
101
  for (const output of outputOptions) {