@514labs/moose-lib 0.6.268-ci-1-g95d8af35 → 0.6.268-ci-2-g822d274c

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/dist/index.mjs CHANGED
@@ -685,6 +685,7 @@ function getSourceDir() {
685
685
  return process2.env.MOOSE_SOURCE_DIR || "app";
686
686
  }
687
687
  var isClientOnlyMode = () => process2.env.MOOSE_CLIENT_ONLY === "true";
688
+ var isProductionMode = () => process2.env.NODE_ENV === "production";
688
689
  var moose_internal = {
689
690
  tables: /* @__PURE__ */ new Map(),
690
691
  streams: /* @__PURE__ */ new Map(),
@@ -712,12 +713,14 @@ var reloadIndex = () => {
712
713
  registry.sqlResources.clear();
713
714
  registry.workflows.clear();
714
715
  registry.webApps.clear();
715
- const appDir = `${process2.cwd()}/${getSourceDir()}`;
716
- Object.keys(__require.cache).forEach((key) => {
717
- if (key.startsWith(appDir)) {
718
- delete __require.cache[key];
719
- }
720
- });
716
+ if (!isProductionMode()) {
717
+ const appDir = `${process2.cwd()}/${getSourceDir()}`;
718
+ Object.keys(__require.cache).forEach((key) => {
719
+ if (key.startsWith(appDir)) {
720
+ delete __require.cache[key];
721
+ }
722
+ });
723
+ }
721
724
  try {
722
725
  __require(`${process2.cwd()}/${getSourceDir()}/index.ts`);
723
726
  } catch (error) {