makepack 1.7.3 → 1.7.5
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 +5 -5
- package/src/actions/build/bundler.js +16 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "makepack",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
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": [
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
31
31
|
"@rollup/plugin-terser": "^0.4.4",
|
|
32
32
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
33
|
+
"@types/fs-extra": "^11.0.4",
|
|
33
34
|
"chokidar": "^4.0.3",
|
|
34
35
|
"commander": "^12.1.0",
|
|
35
36
|
"esbuild": "^0.25.5",
|
|
@@ -39,13 +40,12 @@
|
|
|
39
40
|
"lodash.debounce": "^4.0.8",
|
|
40
41
|
"madge": "^8.0.0",
|
|
41
42
|
"ora": "^8.1.1",
|
|
43
|
+
"react": "^19.1.0",
|
|
44
|
+
"react-dom": "^19.0.0",
|
|
42
45
|
"rollup": "^4.43.0",
|
|
43
46
|
"rollup-plugin-dts": "^6.2.1",
|
|
44
47
|
"tslib": "^2.8.1",
|
|
45
|
-
"vite": "^6.0.2"
|
|
46
|
-
"@types/fs-extra": "^11.0.4",
|
|
47
|
-
"react": "^19.1.0",
|
|
48
|
-
"react-dom": "^19.0.0"
|
|
48
|
+
"vite": "^6.0.2"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"CLI",
|
|
@@ -9,32 +9,37 @@ import dts from "rollup-plugin-dts";
|
|
|
9
9
|
import json from '@rollup/plugin-json';
|
|
10
10
|
import terser from "@rollup/plugin-terser";
|
|
11
11
|
|
|
12
|
-
async function
|
|
12
|
+
async function bind(args, spinner) {
|
|
13
13
|
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
|
|
14
|
-
const
|
|
14
|
+
const _external = [
|
|
15
15
|
...builtinModules,
|
|
16
16
|
...Object.keys(pkg.dependencies ?? {}),
|
|
17
17
|
...Object.keys(pkg.devDependencies ?? {}),
|
|
18
18
|
...Object.keys(pkg.peerDependencies ?? {}),
|
|
19
|
+
"tslib",
|
|
19
20
|
];
|
|
20
21
|
|
|
21
22
|
const isTs = args.entry.endsWith(".ts")
|
|
22
23
|
|
|
23
24
|
const config = {
|
|
24
25
|
input: [args.entry],
|
|
25
|
-
external
|
|
26
|
+
external: (id) => {
|
|
27
|
+
return !id.startsWith('.') && !id.startsWith('/') && !/^[A-Za-z]:\\/.test(id);
|
|
28
|
+
},
|
|
26
29
|
plugins: [
|
|
27
30
|
json(),
|
|
28
31
|
resolve(),
|
|
29
32
|
commonjs(),
|
|
30
33
|
isTs ? typescript({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
target: "ES2017",
|
|
35
|
+
module: "ESNext",
|
|
36
|
+
jsx: "react",
|
|
37
|
+
strict: true,
|
|
38
|
+
forceConsistentCasingInFileNames: true,
|
|
39
|
+
esModuleInterop: true,
|
|
40
|
+
importHelpers: true,
|
|
41
|
+
moduleResolution: "node",
|
|
42
|
+
skipLibCheck: true,
|
|
38
43
|
include: ["src/**/*.ts", "src/**/*.tsx"],
|
|
39
44
|
exclude: ["node_modules", ".mpack"],
|
|
40
45
|
}) : null,
|
|
@@ -96,4 +101,4 @@ async function bundler(args, spinner) {
|
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
|
|
99
|
-
export default
|
|
104
|
+
export default bind;
|