在巨型Eval语句中调试语法错误

时间:2017-08-21 14:54:20

标签: javascript angular internet-explorer

我们有一个Angular应用程序在Chrome中可以正常运行,但是当它在Internet Explorer中运行时,由于Eval语句中的语法错误而导致其爆炸。如何确定Eval语句中的哪一行是罪魁祸首?

"use strict";
eval("/* unused harmony export createSignalRConfig */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AppModule; });\n/* unused harmony export HttpLoaderFactory */\n/* unused harmony export AppInitializerLoaderFactory */\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_http__ = __webpack_require__(91);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__(57);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_material__ = __webpack_require__(40);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_core__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__angular_platform_browser_animations__ = __webpack_require__(908);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_platform_browser__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__angular_forms__ = __webpack_require__(73);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_ng2_signalr__ = __webpack_require__(168);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__core_login_service_login_routing_module__ = __webpack_require__(914);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__core_login_service_login_component__ = __webpack_require__(293);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__app_component__ = __webpack_require__(916);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__app_routing_module__ = __webpack_require__(945);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__app_service__ = __webpack_require__(952);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__angular_redux_store__ = __webpack_require__(63);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__angular_redux_store___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13__angular_redux_store__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_redux_observable__ = __webpack_require__(953);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__shared_store_app_store__ = __webpack_require__(956);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ngx_translate_core__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__ngx_translate_http_loader__ = __webpack_require__(959);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__core_localization_services_localization_resource_resolver__ = __webpack_require__(961);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__core_localization_services_localization_actions__ = __webpack_require__(176);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__core_localization_services_localization_reducers__ = __webpack_require__(310);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__core_localization_services_localization_epics__ = __webpack_require__(962);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__localization_example_localization_example_component__ = __webpack_require__(307);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__core_identity_services_user_service__ = __webpack_require__(963);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__core_identity_services_user_service_reducers__ = __webpack_require__(175);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__core_configuration_config_service__ = __webpack_require__(33);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__core_extensions_add_headers_interceptor__ = __webpack_require__(964);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__shared_app_header_app_header_component__ = __webpack_require__(965);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__shared_global_navigation_global_navigation_component__ = __webpack_require__(969);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__shared_dealer_context_switcher_dealer_context_switcher_component__ = __webpack_require__(974);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__shared_notifications_notifications_component__ = __webpack_require__(978);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__shared_language_switcher_language_switcher_component__ = __webpack_require__(982);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__shared_api_mode_switcher_api_mode_switcher_component__ = __webpack_require__(986);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__shared_not_found_component__ = __webpack_require__(305);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__shared_dialog_service__ = __webpack_require__(990);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__shared_dev_console_dev_console_component__ = __webpack_require__(991);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__shared_dev_console_user_dev_console_user_component__ = __webpack_require__(996);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__shared_dev_console_logging_dev_console_logging_component__ = __webpack_require__(1000);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__dashboard_dashboard_component__ = __webpack_require__(306);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__deal_inquiry_deal_inquiry_module__ = __webpack_require__(1004);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__deal_editor_deal_editor_module__ = __webpack_require__(1071);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__resources_resources_component__ = __webpack_require__(1133);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__buyer_availability_buyer_availability_module__ = __webpack_require__(1135);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__bulletins_bulletins_module__ = __webpack_require__(1138);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__reports_reports_module__ = __webpack_require__(1143);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__group_contract_management_group_contract_management_module__ = __webpack_require__(1151);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__dealer_administration_dealer_administration_module__ = __webpack_require__(1162);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__shared_account_settings_account_settings_module__ = __webpack_require__(1167);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__manage_users_manage_users_module__ = __webpack_require__(1179);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__user_account_user_account_component__ = __webpack_require__(1214);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__core_basecomponent_base_component_module__ = __webpack_require__(1218);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__core_error_handling_services_global_error_handler__ = __webpack_require__(1219);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__core_error_handling_services_error_handling_actions__ = __webpack_require__(124);\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n...    

1 个答案:

答案 0 :(得分:0)

您可以对代码进行细分,看看是否有助于您找到导致问题的行。

http://dailydotnettips.com/2014/03/03/deminify-the-minified-javascript-easily-in-ie-11/

如果在发生分离时,没有显示导致错误的行,您可以使用在线美化/清除器,然后创建一个提供贬值版本的简单页面,以便您找到问题。