@webround/editor 0.3.7 → 0.3.8

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.
@@ -6,6 +6,9 @@ export interface WrPluginsOptions {
6
6
  */
7
7
  allowedHosts?: true | string[];
8
8
  }
9
+ /** How many files Rollup reads at once. Its own default (1000) is too many for a container that lets a process open 1024: a site that imports a library of thousands of small files
10
+ * (an icon set) runs out of them, and Vite reports it as "failed to resolve" on a package that is there. The time of the build does not depend on it (measured: the same from 100 to 900). */
11
+ export declare const BUILD_PARALLEL_FILE_OPS = 300;
9
12
  /**
10
13
  * Facade: tutti i plugin dell'editor, nell'ordine giusto. Il vite.config.ts di un progetto
11
14
  * deve solo spargere `...wrPlugins()` accanto a react() e tailwindcss(); aggiungere un plugin
@@ -19,6 +19,19 @@ function wrWatchConfigPlugin() {
19
19
  config: () => ({ server: { watch: { ignored: ['**/.wr/**'] } } }),
20
20
  };
21
21
  }
22
+ /** How many files Rollup reads at once. Its own default (1000) is too many for a container that lets a process open 1024: a site that imports a library of thousands of small files
23
+ * (an icon set) runs out of them, and Vite reports it as "failed to resolve" on a package that is there. The time of the build does not depend on it (measured: the same from 100 to 900). */
24
+ export const BUILD_PARALLEL_FILE_OPS = 300;
25
+ // A site that sets its own number keeps it.
26
+ function wrBuildConfigPlugin() {
27
+ return {
28
+ name: 'wr-build-config',
29
+ apply: 'build',
30
+ config: (config) => (config.build?.rollupOptions?.maxParallelFileOps === undefined
31
+ ? { build: { rollupOptions: { maxParallelFileOps: BUILD_PARALLEL_FILE_OPS } } }
32
+ : null),
33
+ };
34
+ }
22
35
  /**
23
36
  * Facade: tutti i plugin dell'editor, nell'ordine giusto. Il vite.config.ts di un progetto
24
37
  * deve solo spargere `...wrPlugins()` accanto a react() e tailwindcss(); aggiungere un plugin
@@ -28,6 +41,7 @@ export function wrPlugins(options = {}) {
28
41
  return [
29
42
  ...(options.allowedHosts ? [wrServerConfigPlugin(options.allowedHosts)] : []),
30
43
  wrWatchConfigPlugin(),
44
+ wrBuildConfigPlugin(),
31
45
  // The one door into the project for the editor's page (see operations/)
32
46
  wrOperationsPlugin(),
33
47
  wrPagesPlugin(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webround/editor",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -75,7 +75,7 @@
75
75
  "@lexical/selection": "^0.51.0",
76
76
  "@lexical/utils": "^0.51.0",
77
77
  "@monaco-editor/react": "^4.7.0",
78
- "@webround/core": "^0.3.7",
78
+ "@webround/core": "^0.3.8",
79
79
  "highlight.js": "^11.12.0",
80
80
  "hls.js": "^1.5.0",
81
81
  "lexical": "^0.51.0",