@shohojdhara/atomix 0.5.7 → 0.5.8

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/theme.js CHANGED
@@ -1073,8 +1073,10 @@ const _includesInstanceProperty = getDefaultExportFromCjs((function(it) {
1073
1073
  */
1074
1074
  function loadConfigAtPath(path, required, defaultConfig) {
1075
1075
  try {
1076
- // Use dynamic import for ESM compatibility
1077
- const configModule = require(path), config = configModule.default || configModule;
1076
+ // Use dynamic requirement to hide from bundlers
1077
+ const req = "undefined" != typeof require ? require : void 0;
1078
+ if (!req) return defaultConfig;
1079
+ const configModule = req(path), config = configModule.default || configModule;
1078
1080
  // Validate it's an AtomixConfig
1079
1081
  if (config && "object" == typeof config) return config;
1080
1082
  throw new Error("Invalid config format");
@@ -1135,7 +1137,9 @@ function loadConfigAtPath(path, required, defaultConfig) {
1135
1137
  let loadAtomixConfig;
1136
1138
  try {
1137
1139
  // eslint-disable-next-line @typescript-eslint/no-var-requires
1138
- const {loadAtomixConfig: loader} = require("../../config/loader");
1140
+ const req = "undefined" != typeof require ? require : void 0;
1141
+ if (!req) throw new Error("require is not available");
1142
+ const {loadAtomixConfig: loader} = req("../../config/loader");
1139
1143
  loadAtomixConfig = loader;
1140
1144
  } catch (error) {
1141
1145
  throw new Error("Config loader module not available");