@makano/rew 1.2.85 → 1.2.86
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/rew/modules/context.js +10 -0
- package/package.json +1 -1
@@ -149,6 +149,16 @@ module.exports.prepareContext = function (
|
|
149
149
|
}
|
150
150
|
}
|
151
151
|
|
152
|
+
if(!context.app){
|
153
|
+
context.appPackage = (packageName) => context.app = { config: { manifest: { package: packageName } } }
|
154
|
+
}
|
155
|
+
|
156
|
+
Object.defineProperty(context, 'packageName', {
|
157
|
+
get: () => context.app?.config?.manifest?.package,
|
158
|
+
enumerable: true,
|
159
|
+
configurable: true
|
160
|
+
});
|
161
|
+
|
152
162
|
if (
|
153
163
|
context.module.main ||
|
154
164
|
(options.fromMain == true && options.as == "main")
|