@analogjs/vite-plugin-angular 3.0.0-beta.4 → 3.0.0-beta.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@analogjs/vite-plugin-angular",
3
- "version": "3.0.0-beta.4",
3
+ "version": "3.0.0-beta.6",
4
4
  "description": "Vite Plugin for Angular",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -163,6 +163,7 @@ function angular(options) {
163
163
  return emittedResult;
164
164
  };
165
165
  let initialCompilation = false;
166
+ let activeBuilds = 0;
166
167
  const declarationFiles = [];
167
168
  const fileTransformMap = /* @__PURE__ */ new Map();
168
169
  let styleTransform;
@@ -271,6 +272,7 @@ function angular(options) {
271
272
  });
272
273
  },
273
274
  async buildStart() {
275
+ activeBuilds++;
274
276
  if (!jit) styleTransform = (code, filename) => preprocessCSS(code, filename, resolvedConfig);
275
277
  if (!deferInitialCompilation) {
276
278
  pendingCompilation = performCompilation(this.environment?.config ?? resolvedConfig);
@@ -280,7 +282,8 @@ function angular(options) {
280
282
  }
281
283
  },
282
284
  buildEnd() {
283
- if (watchMode) return;
285
+ activeBuilds = Math.max(0, activeBuilds - 1);
286
+ if (watchMode || activeBuilds > 0) return;
284
287
  nextProgram = void 0;
285
288
  cachedHost = void 0;
286
289
  cachedHostKey = void 0;