@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.js CHANGED
@@ -789,6 +789,7 @@ function getSourceDir() {
789
789
  return import_process.default.env.MOOSE_SOURCE_DIR || "app";
790
790
  }
791
791
  var isClientOnlyMode = () => import_process.default.env.MOOSE_CLIENT_ONLY === "true";
792
+ var isProductionMode = () => import_process.default.env.NODE_ENV === "production";
792
793
  var moose_internal = {
793
794
  tables: /* @__PURE__ */ new Map(),
794
795
  streams: /* @__PURE__ */ new Map(),
@@ -816,12 +817,14 @@ var reloadIndex = () => {
816
817
  registry.sqlResources.clear();
817
818
  registry.workflows.clear();
818
819
  registry.webApps.clear();
819
- const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
820
- Object.keys(require.cache).forEach((key) => {
821
- if (key.startsWith(appDir)) {
822
- delete require.cache[key];
823
- }
824
- });
820
+ if (!isProductionMode()) {
821
+ const appDir = `${import_process.default.cwd()}/${getSourceDir()}`;
822
+ Object.keys(require.cache).forEach((key) => {
823
+ if (key.startsWith(appDir)) {
824
+ delete require.cache[key];
825
+ }
826
+ });
827
+ }
825
828
  try {
826
829
  require(`${import_process.default.cwd()}/${getSourceDir()}/index.ts`);
827
830
  } catch (error) {