mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
fix bundle-config-loader order
# Conflicts: # packages/core/globals/index.ts
This commit is contained in:
@ -1,8 +1,5 @@
|
||||
// Require globals first so that snapshot takes __extends function.
|
||||
const nsGlobals = require('../globals');
|
||||
if (!global.NativeScriptHasInitGlobal) {
|
||||
nsGlobals.initGlobal();
|
||||
}
|
||||
import '../globals';
|
||||
|
||||
// Types
|
||||
import { AndroidApplication, iOSApplication } from '.';
|
||||
|
@ -1,5 +1,5 @@
|
||||
const g = require('./globals');
|
||||
g.initGlobal();
|
||||
// using import is important to ensure webpack keep it in order
|
||||
import './globals';
|
||||
|
||||
// Register "dynamically" loaded module that need to be resolved by the
|
||||
// XML/component builders.
|
||||
|
@ -360,4 +360,4 @@ export function initGlobal() {
|
||||
}
|
||||
if (!global.NativeScriptHasInitGlobal) {
|
||||
initGlobal();
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
/// <reference path="./global-types.d.ts" />
|
||||
// Init globals first (use require to ensure it's always at the top)
|
||||
const nsGlobals = require('./globals');
|
||||
nsGlobals.initGlobal();
|
||||
import '../globals';
|
||||
|
||||
export { iOSApplication, AndroidApplication } from './application';
|
||||
export type { ApplicationEventData, LaunchEventData, OrientationChangedEventData, UnhandledErrorEventData, DiscardedErrorEventData, CssChangedEventData, LoadAppCSSEventData, AndroidActivityEventData, AndroidActivityBundleEventData, AndroidActivityRequestPermissionsEventData, AndroidActivityResultEventData, AndroidActivityNewIntentEventData, AndroidActivityBackPressedEventData, SystemAppearanceChangedEventData } from './application';
|
||||
|
@ -1,8 +1,5 @@
|
||||
console.log('Loading inspector modules...');
|
||||
import { initGlobal } from './globals';
|
||||
if (!global.NativeScriptHasInitGlobal) {
|
||||
initGlobal();
|
||||
}
|
||||
import './globals';
|
||||
require('./debugger/webinspector-network');
|
||||
require('./debugger/webinspector-dom');
|
||||
require('./debugger/webinspector-css');
|
||||
|
@ -1,12 +1,7 @@
|
||||
import '../../globals';
|
||||
import { setActivityCallbacks, AndroidActivityCallbacks } from '.';
|
||||
// use requires to ensure import order
|
||||
const globals = require('../../globals');
|
||||
const appModule = require('../../application');
|
||||
|
||||
if (global.__snapshot) {
|
||||
globals.initGlobal();
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE: We cannot use NativeClass here because this is used in appComponents in webpack.config
|
||||
* Whereby it bypasses the decorator transformation, hence pure es5 style written here
|
||||
|
@ -52,7 +52,7 @@ const loader: loader.Loader = function (source, map) {
|
||||
}
|
||||
|
||||
source = `
|
||||
require("${sourceModule}/bundle-entry-points");
|
||||
import "${sourceModule}/bundle-entry-points";
|
||||
${source}
|
||||
`;
|
||||
|
||||
|
Reference in New Issue
Block a user