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