smartbundle 0.8.0-alpha.2 → 0.8.1
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/README.md
CHANGED
@@ -28,6 +28,7 @@ We've also optimized several aspects to ensure the resulting package is as smoot
|
|
28
28
|
npx smartbundle@latest
|
29
29
|
```
|
30
30
|
The built files will appear in the `./dist` folder, including an auto-generated `package.json` file.
|
31
|
+
|
31
32
|
3) Navigate to the `./dist` folder and publish your package to the npm registry.
|
32
33
|
|
33
34
|
## Supported targets
|
@@ -73,9 +74,9 @@ Only ESM/TS entry points are currently supported in exports. While [conditional
|
|
73
74
|
#### `bin`
|
74
75
|
Currently, we support all `bin` [specifications](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#bin) except for `sh` files. Also, we guarantee that the bin files will execute as expected.
|
75
76
|
|
76
|
-
|
77
|
-
|
77
|
+
## FAQ
|
78
|
+
### Why don't you minify the output?
|
78
79
|
Minification is typically needed only for production. During development, readable, unminified output helps with debugging.
|
79
80
|
|
80
|
-
|
81
|
+
### Why do you require third-party tools for building?
|
81
82
|
We prioritize keeping the `node_modules` size manageable and avoid unnecessary dependencies. If your package does not require TypeScript, for instance, you don’t need to install those specific tools.
|
@@ -41,8 +41,8 @@ async function buildTypesTask({
|
|
41
41
|
}
|
42
42
|
let ts;
|
43
43
|
try {
|
44
|
-
ts = await import("typescript");
|
45
|
-
} catch {
|
44
|
+
ts = (await import("typescript")).default;
|
45
|
+
} catch (e) {
|
46
46
|
throw errors.errors.typescriptNotFound;
|
47
47
|
}
|
48
48
|
const files = buildOutput.map((el) => el.facadeModuleId ?? "");
|
@@ -17,8 +17,8 @@ async function buildTypesTask({
|
|
17
17
|
}
|
18
18
|
let ts;
|
19
19
|
try {
|
20
|
-
ts = await import("typescript");
|
21
|
-
} catch {
|
20
|
+
ts = (await import("typescript")).default;
|
21
|
+
} catch (e) {
|
22
22
|
throw errors.typescriptNotFound;
|
23
23
|
}
|
24
24
|
const files = buildOutput.map((el) => el.facadeModuleId ?? "");
|