@data-fair/lib-vue 1.24.0 → 1.24.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/vite.d.ts +5 -0
  3. package/vite.js +21 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vue",
3
- "version": "1.24.0",
3
+ "version": "1.24.1",
4
4
  "description": "Composables and other utilities for Vue applications in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
package/vite.d.ts CHANGED
@@ -9,3 +9,8 @@ export declare const autoImports: (string | {
9
9
  '@data-fair/lib-vue/async-action.js': string[];
10
10
  '@data-fair/lib-vue/deep-diff.js': string[];
11
11
  })[];
12
+ export declare function ClosePlugin(): {
13
+ name: string;
14
+ buildEnd(error: any): void;
15
+ closeBundle(): never;
16
+ };
package/vite.js CHANGED
@@ -15,3 +15,24 @@ export const autoImports = [
15
15
  '@data-fair/lib-vue/deep-diff.js': ['computedDeepDiff', 'watchDeepDiff'],
16
16
  }
17
17
  ];
18
+ // cf https://stackoverflow.com/questions/75839993/vite-build-hangs-forever/76920975#76920975
19
+ export function ClosePlugin() {
20
+ return {
21
+ name: 'ClosePlugin', // required, will show up in warnings and errors
22
+ // use this to catch errors when building
23
+ buildEnd(error) {
24
+ if (error) {
25
+ console.error(error);
26
+ process.exit(1);
27
+ }
28
+ else {
29
+ console.log('Build ended');
30
+ }
31
+ },
32
+ // use this to catch the end of a build without errors
33
+ closeBundle() {
34
+ console.log('Bundle closed');
35
+ process.exit(0);
36
+ },
37
+ };
38
+ }