makepack 1.7.6 → 1.7.7
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 +1 -1
- package/src/actions/build/bundler.js +11 -9
package/package.json
CHANGED
|
@@ -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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
|
@@ -112,6 +112,8 @@ async function bind(args, spinner) {
|
|
|
112
112
|
});
|
|
113
113
|
await bundlets.write({
|
|
114
114
|
format: "esm",
|
|
115
|
+
preserveModules: true,
|
|
116
|
+
preserveModulesRoot: args.rootdir,
|
|
115
117
|
dir: path.join(args.outdir),
|
|
116
118
|
});
|
|
117
119
|
await bundlets.close();
|