@gxp-dev/tools 2.0.48 → 2.0.49
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 +1 -1
- package/runtime/vite.config.js +5 -16
package/package.json
CHANGED
package/runtime/vite.config.js
CHANGED
|
@@ -95,22 +95,11 @@ function getHttpsConfig(env) {
|
|
|
95
95
|
* Find the gx-devtools package directory (works for both local and global installs)
|
|
96
96
|
*/
|
|
97
97
|
function findToolkitPath() {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
//
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
return localPath;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// Try to find via require.resolve
|
|
107
|
-
try {
|
|
108
|
-
const pkgPath = require.resolve(`${packageName}/package.json`);
|
|
109
|
-
return path.dirname(pkgPath);
|
|
110
|
-
} catch (e) {
|
|
111
|
-
// Fallback: assume we're in the toolkit itself during development
|
|
112
|
-
return process.cwd();
|
|
113
|
-
}
|
|
98
|
+
// Derive from this config file's own location — always reliable regardless
|
|
99
|
+
// of how the package is installed (local, global, npm link, CI, etc.)
|
|
100
|
+
// This file lives at <toolkit>/runtime/vite.config.js, so toolkit root is one level up.
|
|
101
|
+
const configFileDir = path.dirname(fileURLToPath(import.meta.url));
|
|
102
|
+
return path.resolve(configFileDir, "..");
|
|
114
103
|
}
|
|
115
104
|
|
|
116
105
|
/**
|