xanix 1.0.16 → 1.0.17

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.
@@ -20,7 +20,6 @@ const watchServer = async ({ rootEntry, onChange, onBuildEnd, onClientEntryChang
20
20
  const input = {
21
21
  index: path.resolve(root, rootEntry),
22
22
  };
23
- // const changedFiles = new Set<string>();
24
23
  const watcher = watch({
25
24
  input,
26
25
  treeshake: true,
@@ -29,9 +28,6 @@ const watchServer = async ({ rootEntry, onChange, onBuildEnd, onClientEntryChang
29
28
  target: "server",
30
29
  development: true,
31
30
  assetExternal: false,
32
- // onChange: (entry) => {
33
- // changedFiles.add(entry);
34
- // },
35
31
  }),
36
32
  ],
37
33
  external(id) {
@@ -84,9 +84,6 @@ const dev = async (rootEntry) => {
84
84
  },
85
85
  onChange: async (files) => {
86
86
  clientChangeFiles = files;
87
- await startServer();
88
- broadcast(JSON.stringify(files));
89
- logger.info(`Client ${pc.yellow(files.join(", "))}`, "update");
90
87
  },
91
88
  onBuildEnd(duration) {
92
89
  startDuration += duration;
@@ -103,6 +100,11 @@ const dev = async (rootEntry) => {
103
100
  await startServer();
104
101
  logger.info(`Server ${pc.yellow(files.join(", "))}`, "update");
105
102
  }
103
+ else {
104
+ await startServer();
105
+ broadcast(JSON.stringify(clientChangeFiles));
106
+ logger.info(`Client ${pc.yellow(files.join(", "))}`, "update");
107
+ }
106
108
  clientChangeFiles = [];
107
109
  },
108
110
  onClientEntryChange: async (_entry, entries) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xanix",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",