makepack 1.3.9 → 1.4.0
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 +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,9 +18,29 @@ This will allow you to use the `makepack` command anywhere in your terminal.
|
|
|
18
18
|
|
|
19
19
|
## Configuration Files
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Previously, the project used separate configuration files for Vite and esbuild:
|
|
22
|
+
- `vite.config.js`
|
|
23
|
+
- `esbuild.config.js`
|
|
22
24
|
|
|
25
|
+
These files have been removed and replaced with a single configuration file: `makepack.js`.
|
|
23
26
|
|
|
27
|
+
## makepack.js
|
|
28
|
+
|
|
29
|
+
The `makepack.js` file exports a function that takes the previous configuration (`prevConfig`) and returns a new configuration (`newConfig`). This allows you to configure both esbuild and Vite in one place.
|
|
30
|
+
|
|
31
|
+
### Example Usage
|
|
32
|
+
|
|
33
|
+
```javascript
|
|
34
|
+
// filepath: /Volumes/Work Space/makepack/makepack.js
|
|
35
|
+
module.exports = function(prevConfig) {
|
|
36
|
+
const newConfig = {
|
|
37
|
+
// ...your new configuration here...
|
|
38
|
+
};
|
|
39
|
+
return newConfig;
|
|
40
|
+
};
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This approach simplifies the configuration process by consolidating it into a single file.
|
|
24
44
|
|
|
25
45
|
## Commands
|
|
26
46
|
|
package/package.json
CHANGED