makepack 1.7.6 → 1.7.8

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.6",
3
+ "version": "1.7.8",
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": [
@@ -2,7 +2,7 @@ import { rollup } from "rollup";
2
2
  import resolve from "@rollup/plugin-node-resolve";
3
3
  import commonjs from "@rollup/plugin-commonjs";
4
4
  import typescript from "@rollup/plugin-typescript";
5
- import { builtinModules } from "module";
5
+ // import { builtinModules } from "module";
6
6
  import fs from "fs";
7
7
  import path from "path";
8
8
  import dts from "rollup-plugin-dts";
@@ -10,14 +10,14 @@ import json from '@rollup/plugin-json';
10
10
  import terser from "@rollup/plugin-terser";
11
11
 
12
12
  async function bind(args, spinner) {
13
- const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
14
- const _external = [
15
- ...builtinModules,
16
- ...Object.keys(pkg.dependencies ?? {}),
17
- ...Object.keys(pkg.devDependencies ?? {}),
18
- ...Object.keys(pkg.peerDependencies ?? {}),
19
- "tslib",
20
- ];
13
+ // const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
14
+ // const _external = [
15
+ // ...builtinModules,
16
+ // ...Object.keys(pkg.dependencies ?? {}),
17
+ // ...Object.keys(pkg.devDependencies ?? {}),
18
+ // ...Object.keys(pkg.peerDependencies ?? {}),
19
+ // "tslib",
20
+ // ];
21
21
 
22
22
  const isTs = args.entry.endsWith(".ts")
23
23
 
@@ -34,17 +34,32 @@ async function bind(args, spinner) {
34
34
  }),
35
35
  commonjs(),
36
36
  isTs ? typescript({
37
+ // target: "ES2017",
38
+ // module: "ESNext",
39
+ // jsx: "react",
40
+ // strict: true,
41
+ // forceConsistentCasingInFileNames: true,
42
+ // esModuleInterop: true,
43
+ // importHelpers: true,
44
+ // moduleResolution: "node",
45
+ // skipLibCheck: true,
46
+ // include: ["src/**/*.ts", "src/**/*.tsx"],
47
+ // exclude: ["node_modules", ".mpack"],
48
+
49
+ tsconfig: false,
37
50
  target: "ES2017",
38
51
  module: "ESNext",
39
- jsx: "react",
40
- strict: true,
41
- forceConsistentCasingInFileNames: true,
42
- esModuleInterop: true,
43
- importHelpers: true,
52
+ jsx: "react-jsx",
44
53
  moduleResolution: "node",
54
+ esModuleInterop: true,
45
55
  skipLibCheck: true,
56
+ strict: true,
57
+ importHelpers: true,
58
+ forceConsistentCasingInFileNames: true,
59
+ declaration: false,
60
+ emitDeclarationOnly: false,
46
61
  include: ["src/**/*.ts", "src/**/*.tsx"],
47
- exclude: ["node_modules", ".mpack"],
62
+ exclude: ["node_modules", ".mpack"]
48
63
  }) : null,
49
64
  args.minify ? terser() : null,
50
65
  ]
@@ -112,6 +127,8 @@ async function bind(args, spinner) {
112
127
  });
113
128
  await bundlets.write({
114
129
  format: "esm",
130
+ preserveModules: true,
131
+ preserveModulesRoot: args.rootdir,
115
132
  dir: path.join(args.outdir),
116
133
  });
117
134
  await bundlets.close();