@webround/editor 0.3.1 → 0.3.2

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.
@@ -11,6 +11,14 @@ function wrServerConfigPlugin(allowedHosts) {
11
11
  config: () => ({ server: { allowedHosts } }),
12
12
  };
13
13
  }
14
+ // `.wr/` è dell'editor (i commenti, mai nel sito): nessuno dei suoi file è del sito, e il dev server non deve guardarli. Se li guarda,
15
+ // Tailwind li trova tra i file che scansiona e a ogni commento ricarica tutta la pagina (il flash bianco).
16
+ function wrWatchConfigPlugin() {
17
+ return {
18
+ name: 'wr-watch-config',
19
+ config: () => ({ server: { watch: { ignored: ['**/.wr/**'] } } }),
20
+ };
21
+ }
14
22
  /**
15
23
  * Facade: tutti i plugin dell'editor, nell'ordine giusto. Il vite.config.ts di un progetto
16
24
  * deve solo spargere `...wrPlugins()` accanto a react() e tailwindcss(); aggiungere un plugin
@@ -19,6 +27,7 @@ function wrServerConfigPlugin(allowedHosts) {
19
27
  export function wrPlugins(options = {}) {
20
28
  return [
21
29
  ...(options.allowedHosts ? [wrServerConfigPlugin(options.allowedHosts)] : []),
30
+ wrWatchConfigPlugin(),
22
31
  // The one door into the project for the editor's page (see operations/)
23
32
  wrOperationsPlugin(),
24
33
  wrPagesPlugin(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webround/editor",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",