@livx.cc/appwrap 0.38.1 → 0.38.3
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/webpack.config.js +8 -0
- package/src/cli.ts +1 -1
package/package.json
CHANGED
|
@@ -3,6 +3,14 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
|
|
5
5
|
module.exports = (env) => {
|
|
6
|
+
// Force CommonJS bundle output. @nativescript/ios >=9 flips @nativescript/webpack to ESM (.mjs),
|
|
7
|
+
// which makes @nativescript/core install its polyfills EAGERLY at bundle eval (matchMedia /
|
|
8
|
+
// media-query-list) — and that eager install crashes on launch ("Cannot read properties of
|
|
9
|
+
// undefined" in installPolyfills→matchMedia), white-screening/killing the app at startup. CommonJS
|
|
10
|
+
// uses the lazy polyfill path (the long-stable NS mode). appwrap runtime uses no import.meta, so
|
|
11
|
+
// CommonJS is safe. Remove only once the NS-core ESM eager-install bug is fixed upstream.
|
|
12
|
+
env = env || {};
|
|
13
|
+
env.commonjs = true;
|
|
6
14
|
webpack.init(env);
|
|
7
15
|
|
|
8
16
|
webpack.chainWebpack((config) => {
|
package/src/cli.ts
CHANGED
|
@@ -411,7 +411,7 @@ export const SHELL_CONFIG = {
|
|
|
411
411
|
debugLog: ${JSON.stringify(cfg.debugLog ?? '*')},
|
|
412
412
|
devMenu: ${JSON.stringify(cfg.devMenu ?? true)},
|
|
413
413
|
neutralizeServiceWorker: ${JSON.stringify(cfg.neutralizeServiceWorker ?? true)},
|
|
414
|
-
appBoundDomains: ${JSON.stringify(cfg.appBoundDomains ?? [])},
|
|
414
|
+
appBoundDomains: ${JSON.stringify(cfg.appBoundDomains ?? [])} as string[],
|
|
415
415
|
openNewWindowsInBrowser: ${JSON.stringify(cfg.openNewWindowsInBrowser ?? false)},
|
|
416
416
|
pushIos: ${JSON.stringify(!!cfg.push?.enabled && cfg.push?.ios !== false)},
|
|
417
417
|
pushAndroid: ${JSON.stringify(!!cfg.push?.enabled && cfg.push?.android !== false)},
|