From d16634172973ad763327129bab64f94e1c3cb32e Mon Sep 17 00:00:00 2001 From: zhiqingchen <329604487@qq.com> Date: Sun, 10 Apr 2022 21:09:16 +0800 Subject: [PATCH] fix: update webpack-runner & mini-runner snap @babel/helpers - typeof update --- .../__snapshots__/alipay.spec.ts.snap | 74 ++-- .../__snapshots__/babel.spec.ts.snap | 86 ++--- .../__snapshots__/bytedance.spec.ts.snap | 64 ++-- .../__snapshots__/common-style.spec.ts.snap | 68 ++-- .../compiler-macros.spec.ts.snap | 88 ++--- .../__snapshots__/config.spec.ts.snap | 258 ++++++------- .../__snapshots__/css-modules.spec.ts.snap | 146 ++++---- .../__snapshots__/custom-tabbar.spec.ts.snap | 72 ++-- .../__tests__/__snapshots__/jd.spec.ts.snap | 68 ++-- .../__snapshots__/parse-html.spec.ts.snap | 86 ++--- .../__snapshots__/prerender.spec.ts.snap | 234 ++++++------ .../__tests__/__snapshots__/qq.spec.ts.snap | 136 ++++--- .../__snapshots__/react.spec.ts.snap | 68 ++-- .../__tests__/__snapshots__/sass.spec.ts.snap | 344 ++++++++---------- .../__snapshots__/subpackages.spec.ts.snap | 78 ++-- .../__tests__/__snapshots__/swan.spec.ts.snap | 64 ++-- .../__snapshots__/tabbar.spec.ts.snap | 150 ++++---- .../__tests__/__snapshots__/ts.spec.ts.snap | 86 ++--- .../__snapshots__/wx-hybrid.spec.ts.snap | 76 ++-- .../__snapshots__/babel.spec.ts.snap | 58 ++- .../compiler-macros.spec.ts.snap | 58 ++- .../__snapshots__/config.spec.ts.snap | 182 +++++---- .../__snapshots__/css-modules.spec.ts.snap | 130 +++---- .../__tests__/__snapshots__/nerv.spec.ts.snap | 58 ++- .../__snapshots__/react.spec.ts.snap | 58 ++- .../__tests__/__snapshots__/sass.spec.ts.snap | 288 +++++++-------- .../__snapshots__/subpackages.spec.ts.snap | 66 ++-- .../__tests__/__snapshots__/ts.spec.ts.snap | 58 ++- 28 files changed, 1442 insertions(+), 1760 deletions(-) diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap index 9a373846095c..d5c3f461356e 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/alipay.spec.ts.snap @@ -45,7 +45,7 @@ require(\\"./taro\\"); function processApis() {} var EMPTY_OBJ = {}; }, - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; (function(navigator) { var _tarojs_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); @@ -558,11 +558,11 @@ require(\\"./taro\\"); Object(_tarojs_shared__WEBPACK_IMPORTED_MODULE_0__[\\"e\\"])(components); }).call(this, __webpack_require__(0)[\\"navigator\\"]); }, - 14: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); - var runtime = __webpack_require__(13); + var runtime = __webpack_require__(12); var taro_runtime = __webpack_require__(0); function _defineProperty(obj, key, value) { if (key in obj) { @@ -1214,7 +1214,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(2); - var src_app = __webpack_require__(14); + var src_app = __webpack_require__(13); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1243,7 +1243,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(10); + var taro_react = __webpack_require__(9); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1264,7 +1264,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); @@ -1445,13 +1445,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1465,13 +1465,13 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 16: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"dependencies\\"; }, - 17: function(module, exports, __webpack_require__) {}, - 19: function(module, __webpack_exports__, __webpack_require__) { + 16: function(module, exports, __webpack_require__) {}, + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1512,7 +1512,7 @@ require(\\"./taro\\"); var regenerator_default = __webpack_require__.n(regenerator); var react = __webpack_require__(2); var taro_components = __webpack_require__(3); - var index = __webpack_require__(17); + var index = __webpack_require__(16); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1580,9 +1580,9 @@ require(\\"./taro\\"); }, config || {})); }, 8: function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(16); + module.exports = __webpack_require__(15); } -}, [ [ 19, 0, 1, 3, 2 ] ] ]); +}, [ [ 18, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\"}} @@ -1597,13 +1597,13 @@ require(\\"./taro\\"); __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"taro-runtime-mock\\"; }, - 10: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - }, 3: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } } ]); @@ -1658,6 +1658,9 @@ export default { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1682,8 +1685,14 @@ export default { return false; } } - var helpers_typeof = __webpack_require__(9); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1691,7 +1700,7 @@ export default { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1734,26 +1743,11 @@ export default { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap index 096e48bfc2ba..901aa1a1a1b2 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/babel.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(11); + var src_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -1869,13 +1869,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1886,13 +1886,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1905,8 +1905,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1916,7 +1916,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1948,7 +1948,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -1964,20 +1964,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -2048,6 +2044,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2072,8 +2071,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2081,7 +2086,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2124,26 +2129,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap index 7be721955de1..c9b4ce5811b3 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/bytedance.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -726,7 +726,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(12); + var src_app = __webpack_require__(11); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -755,7 +755,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -776,7 +776,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); @@ -956,13 +956,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -975,13 +975,13 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (tt[\\"webpackJsonp\\"] = tt[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"dependencies\\"; }, - 15: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1022,7 +1022,7 @@ require(\\"./taro\\"); var regenerator_default = __webpack_require__.n(regenerator); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(15); + var index = __webpack_require__(14); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1090,9 +1090,9 @@ require(\\"./taro\\"); }, config || {})); }, 7: function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); + module.exports = __webpack_require__(13); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\"}} @@ -1117,7 +1117,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -1151,6 +1151,9 @@ require(\\"./taro\\"); function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1175,8 +1178,14 @@ require(\\"./taro\\"); return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1184,7 +1193,7 @@ require(\\"./taro\\"); return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1227,26 +1236,11 @@ require(\\"./taro\\"); configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap index 066694d6762c..2c9881153df8 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/common-style.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 13: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(13); + var src_app = __webpack_require__(12); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\", \\"pages/about/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); @@ -1866,7 +1866,7 @@ require(\\"./taro\\"); __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"react-mock\\"; }, - 16: function(module, exports, __webpack_require__) {}, + 15: function(module, exports, __webpack_require__) {}, 7: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.d(__webpack_exports__, \\"a\\", (function() { @@ -1878,7 +1878,7 @@ require(\\"./taro\\"); var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6); - var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16); + var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15); var _index_scss__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_scss__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -1905,13 +1905,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1922,13 +1922,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1941,7 +1941,7 @@ require(\\"./taro\\"); /** filePath: dist/pages/about/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 19: function(module, __webpack_exports__, __webpack_require__) { + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1980,7 +1980,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 19, 0, 1, 3, 2 ] ] ]); +}, [ [ 18, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/about/index.json **/ {\\"navigationBarTitleText\\":\\"关于\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -1991,7 +1991,7 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 18: function(module, __webpack_exports__, __webpack_require__) { + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2030,7 +2030,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -2052,7 +2052,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -2127,6 +2127,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2151,8 +2154,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2160,7 +2169,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2203,26 +2212,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap index ebc95469611c..597ff877bed9 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap @@ -14,8 +14,7 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 10: function(module, exports, __webpack_require__) {}, - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1019,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(10); + var src_app = __webpack_require__(9); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1048,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1069,8 +1068,9 @@ require(\\"./taro\\"); 828: .905 } }); - } -}, [ [ 14, 0, 1, 3, 2 ] ] ]); + }, + 9: function(module, exports, __webpack_require__) {} +}, [ [ 13, 0, 1, 3, 2 ] ] ]); @@ -1869,13 +1869,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 11: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 11, 0, 1 ] ] ]); +}, [ [ 10, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1886,13 +1886,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1905,8 +1905,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 13: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1916,7 +1916,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(13); + var index = __webpack_require__(12); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1943,7 +1943,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -1959,20 +1959,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -2043,6 +2039,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2067,8 +2066,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2076,7 +2081,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2119,26 +2124,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap index 9dad4a98f923..1f15abbcb46f 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/config.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var origin_app = __webpack_require__(11); + var origin_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_origin_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -2045,13 +2045,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2062,13 +2062,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2081,8 +2081,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2098,7 +2098,7 @@ require(\\"./taro\\"); function miao() { console.log(\\"say: \\", say()); } - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -2130,7 +2130,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -2146,20 +2146,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -2230,6 +2226,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2254,8 +2253,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2263,7 +2268,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2306,26 +2311,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -2344,8 +2334,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -3350,7 +3340,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var origin_app = __webpack_require__(11); + var origin_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -3379,7 +3369,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_origin_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -3400,7 +3390,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -4199,13 +4189,13 @@ require(\\"./taro\\"); /** filePath: output/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: output/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4216,13 +4206,13 @@ require(\\"./taro\\"); /** filePath: output/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: output/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4235,8 +4225,8 @@ require(\\"./taro\\"); /** filePath: output/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -4252,7 +4242,7 @@ require(\\"./taro\\"); function miao() { console.log(\\"say: \\", say()); } - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -4284,7 +4274,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: output/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -4414,20 +4404,16 @@ require(\\"./taro\\"); })([]); /** filePath: output/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: output/utils.wxs **/ module.exports = { @@ -4498,6 +4484,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -4522,8 +4511,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -4531,7 +4526,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -4574,26 +4569,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -4612,8 +4592,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -5618,7 +5598,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var origin_app = __webpack_require__(11); + var origin_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -5647,7 +5627,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_origin_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -5668,7 +5648,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -6467,13 +6447,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -6484,13 +6464,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -6507,8 +6487,8 @@ I m irrelevant. /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -6524,7 +6504,7 @@ I m irrelevant. function miao() { console.log(\\"say: \\", say()); } - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -6556,7 +6536,7 @@ I m irrelevant. } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -6572,20 +6552,16 @@ I m irrelevant. /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -6656,6 +6632,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -6680,8 +6659,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -6689,7 +6674,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -6732,26 +6717,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); /** filePath: dist/weapp/index.wxml **/ diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap index eddb6c6a938d..75016bfaa42d 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 13: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(13); + var src_app = __webpack_require__(12); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); @@ -1869,13 +1869,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1886,13 +1886,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1905,13 +1905,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 10: function(module, exports, __webpack_require__) { - module.exports = { - cwrapper: \\"index__cwrapper___oXrpd\\" - }; - }, - 16: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1923,9 +1918,9 @@ require(\\"./taro\\"); var taro_components = __webpack_require__(6); var index_module = __webpack_require__(7); var index_module_default = __webpack_require__.n(index_module); - var index = __webpack_require__(10); + var index = __webpack_require__(9); var index_default = __webpack_require__.n(index); - var index_global = __webpack_require__(16); + var index_global = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1971,8 +1966,13 @@ require(\\"./taro\\"); cbody: \\"index-module__cbody___3Vfl2\\", ctext: \\"index-module__ctext___Dq1RJ\\" }; + }, + 9: function(module, exports, __webpack_require__) { + module.exports = { + cwrapper: \\"index__cwrapper___oXrpd\\" + }; } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -1997,7 +1997,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -2072,6 +2072,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2096,8 +2099,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2105,7 +2114,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2148,26 +2157,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -2186,8 +2180,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 13: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -3192,7 +3186,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(13); + var src_app = __webpack_require__(12); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -3221,7 +3215,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -3242,7 +3236,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); @@ -4041,13 +4035,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4058,13 +4052,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4077,9 +4071,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 10: function(module, exports, __webpack_require__) {}, - 16: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -4091,9 +4084,9 @@ require(\\"./taro\\"); var taro_components = __webpack_require__(6); var index_module = __webpack_require__(7); var index_module_default = __webpack_require__.n(index_module); - var index = __webpack_require__(10); + var index = __webpack_require__(9); var index_default = __webpack_require__.n(index); - var index_global = __webpack_require__(16); + var index_global = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -4139,8 +4132,9 @@ require(\\"./taro\\"); cbody: \\"index-module__cbody___3Vfl2\\", ctext: \\"index-module__ctext___Dq1RJ\\" }; - } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); + }, + 9: function(module, exports, __webpack_require__) {} +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -4165,7 +4159,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -4240,6 +4234,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -4264,8 +4261,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -4273,7 +4276,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -4316,26 +4319,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap index 4cc63c9c79f7..ada4337901a9 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/custom-tabbar.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 14: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = __webpack_require__(2); @@ -1014,7 +1014,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(14); + var src_app = __webpack_require__(13); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1043,7 +1043,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\", \\"pages/detail/index\\" ], window: { @@ -1082,7 +1082,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); @@ -2068,13 +2068,13 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2085,8 +2085,8 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/custom-tab-bar/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 17: function(module, exports, __webpack_require__) {}, - 21: function(module, __webpack_exports__, __webpack_require__) { + 16: function(module, exports, __webpack_require__) {}, + 20: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2097,7 +2097,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 var react = __webpack_require__(1); var taro_components = __webpack_require__(7); var taro = __webpack_require__(2); - var custom_tab_bar = __webpack_require__(17); + var custom_tab_bar = __webpack_require__(16); var custom_tab_bar_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -2133,7 +2133,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 }(react[\\"Component\\"]); var inst = Component(Object(taro_runtime[\\"createComponentConfig\\"])(custom_tab_bar_Index, \\"custom-tab-bar/index\\")); } -}, [ [ 21, 0, 1, 3, 2 ] ] ]); +}, [ [ 20, 0, 1, 3, 2 ] ] ]); /** filePath: dist/custom-tab-bar/index.json **/ {} @@ -2147,13 +2147,13 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 9 ], { - 16: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 16, 0, 1 ] ] ]); +}, [ [ 15, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2166,7 +2166,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/pages/detail/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 20: function(module, __webpack_exports__, __webpack_require__) { + 19: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2202,7 +2202,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 } }, config || {})); } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); +}, [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/detail/index.json **/ {\\"navigationBarTitleText\\":\\"详情页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -2213,7 +2213,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 12 ], { - 19: function(module, __webpack_exports__, __webpack_require__) { + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2249,7 +2249,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 } }, config || {})); } -}, [ [ 19, 0, 1, 3, 2 ] ] ]); +}, [ [ 18, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -2271,7 +2271,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -2346,6 +2346,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2370,8 +2373,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2379,7 +2388,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2422,26 +2431,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap index 403628b1d5ec..6f28cfb15899 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/jd.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (jd[\\"webpackJsonp\\"] = jd[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -697,7 +697,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(12); + var src_app = __webpack_require__(11); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -726,7 +726,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -747,7 +747,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); @@ -3064,13 +3064,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (jd[\\"webpackJsonp\\"] = jd[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -3081,13 +3081,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (jd[\\"webpackJsonp\\"] = jd[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -3100,13 +3100,13 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (jd[\\"webpackJsonp\\"] = jd[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"dependencies\\"; }, - 16: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -3147,7 +3147,7 @@ require(\\"./taro\\"); var regenerator_default = __webpack_require__.n(regenerator); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); + var index = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -3215,9 +3215,9 @@ require(\\"./taro\\"); }, config || {})); }, 7: function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(15); + module.exports = __webpack_require__(14); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -3242,7 +3242,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -3276,6 +3276,9 @@ require(\\"./taro\\"); function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -3300,8 +3303,14 @@ require(\\"./taro\\"); return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -3309,7 +3318,7 @@ require(\\"./taro\\"); return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -3352,26 +3361,11 @@ require(\\"./taro\\"); configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap index d0cf065e3ade..b587c3c1a1e7 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/parse-html.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(11); + var src_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -1869,13 +1869,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1886,13 +1886,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1905,8 +1905,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1916,7 +1916,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1948,7 +1948,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -1964,20 +1964,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -2048,6 +2044,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2072,8 +2071,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2081,7 +2086,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2124,26 +2129,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap index cafda6319279..2d7fc1ebb008 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/prerender.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 13: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1008,7 +1008,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(13); + var src_app = __webpack_require__(12); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1037,7 +1037,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(10); + var taro_react = __webpack_require__(9); var app_config = { pages: [ \\"pages/index/index\\", \\"others/detail/index\\", \\"others/normal/index\\" ], window: { @@ -1061,7 +1061,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { @@ -1869,13 +1869,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1886,13 +1886,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1905,7 +1905,7 @@ require(\\"./taro\\"); /** filePath: dist/others/detail/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 18: function(module, __webpack_exports__, __webpack_require__) { + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -3177,7 +3177,7 @@ require(\\"./taro\\"); wx._prerender = inst; } } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { module.exports = wx._prerender } @@ -3196,7 +3196,7 @@ require(\\"./taro\\"); /** filePath: dist/others/normal/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 9 ], { - 20: function(module, __webpack_exports__, __webpack_require__) { + 19: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -3238,7 +3238,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); +}, [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/others/normal/index.json **/ {\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -3249,8 +3249,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 16: function(module, exports, __webpack_require__) {}, - 19: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -3260,7 +3260,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(5); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); + var index = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -3290,7 +3290,7 @@ require(\\"./taro\\"); wx._prerender = inst; } } -}, [ [ 19, 0, 1, 3, 2 ] ] ]); +}, [ [ 18, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { module.exports = wx._prerender } @@ -3319,13 +3319,13 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-runtime-mock\\"; }, - 10: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - }, 2: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } } ]); @@ -3398,6 +3398,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -3422,11 +3425,17 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(9); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } var assertThisInitialized = __webpack_require__(8); function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -3469,6 +3478,9 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } }, function(module, __webpack_exports__, __webpack_require__) { @@ -3500,24 +3512,6 @@ module.exports = { } return self; } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -3536,8 +3530,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 13: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -4530,7 +4524,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(13); + var src_app = __webpack_require__(12); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -4559,7 +4553,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(10); + var taro_react = __webpack_require__(9); var app_config = { pages: [ \\"pages/index/index\\", \\"others/detail/index\\", \\"others/normal/index\\" ], window: { @@ -4583,7 +4577,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { @@ -5391,13 +5385,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -5408,13 +5402,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -5427,7 +5421,7 @@ require(\\"./taro\\"); /** filePath: dist/others/detail/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 18: function(module, __webpack_exports__, __webpack_require__) { + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -6699,7 +6693,7 @@ require(\\"./taro\\"); wx._prerender = inst; } } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { module.exports = wx._prerender } @@ -6718,7 +6712,7 @@ require(\\"./taro\\"); /** filePath: dist/others/normal/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 9 ], { - 20: function(module, __webpack_exports__, __webpack_require__) { + 19: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -6760,7 +6754,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); +}, [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/others/normal/index.json **/ {\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -6771,8 +6765,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 16: function(module, exports, __webpack_require__) {}, - 19: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -6782,7 +6776,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(5); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); + var index = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -6812,7 +6806,7 @@ require(\\"./taro\\"); wx._prerender = inst; } } -}, [ [ 19, 0, 1, 3, 2 ] ] ]); +}, [ [ 18, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { module.exports = wx._prerender } @@ -6841,13 +6835,13 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-runtime-mock\\"; }, - 10: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - }, 2: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } } ]); @@ -6920,6 +6914,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -6944,11 +6941,17 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(9); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } var assertThisInitialized = __webpack_require__(8); function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -6991,6 +6994,9 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } }, function(module, __webpack_exports__, __webpack_require__) { @@ -7022,24 +7028,6 @@ module.exports = { } return self; } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -7058,8 +7046,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 13: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -8052,7 +8040,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(13); + var src_app = __webpack_require__(12); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -8081,7 +8069,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(10); + var taro_react = __webpack_require__(9); var app_config = { pages: [ \\"pages/index/index\\", \\"others/detail/index\\", \\"others/normal/index\\" ], window: { @@ -8105,7 +8093,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { @@ -8913,13 +8901,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -8930,13 +8918,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -8949,7 +8937,7 @@ require(\\"./taro\\"); /** filePath: dist/others/detail/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 18: function(module, __webpack_exports__, __webpack_require__) { + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -10221,7 +10209,7 @@ require(\\"./taro\\"); wx._prerender = inst; } } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { module.exports = wx._prerender } @@ -10240,7 +10228,7 @@ require(\\"./taro\\"); /** filePath: dist/others/normal/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 9 ], { - 20: function(module, __webpack_exports__, __webpack_require__) { + 19: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -10282,7 +10270,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); +}, [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/others/normal/index.json **/ {\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -10293,8 +10281,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 16: function(module, exports, __webpack_require__) {}, - 19: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -10304,7 +10292,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(5); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); + var index = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -10334,7 +10322,7 @@ require(\\"./taro\\"); wx._prerender = inst; } } -}, [ [ 19, 0, 1, 3, 2 ] ] ]); +}, [ [ 18, 0, 1, 3, 2 ] ] ]); if (typeof PRERENDER !== 'undefined') { module.exports = wx._prerender } @@ -10363,13 +10351,13 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-runtime-mock\\"; }, - 10: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - }, 2: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } } ]); @@ -10442,6 +10430,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -10466,11 +10457,17 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(9); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } var assertThisInitialized = __webpack_require__(8); function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -10513,6 +10510,9 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } }, function(module, __webpack_exports__, __webpack_require__) { @@ -10544,24 +10544,6 @@ module.exports = { } return self; } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap index 47f472bb169d..79da80e231bf 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/qq.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); function _arrayLikeToArray(arr, len) { @@ -1047,7 +1047,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(12); + var src_app = __webpack_require__(11); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1076,7 +1076,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1097,7 +1097,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); @@ -2126,13 +2126,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2143,13 +2143,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2162,13 +2162,13 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"dependencies\\"; }, - 16: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2209,7 +2209,7 @@ require(\\"./taro\\"); var regenerator_default = __webpack_require__.n(regenerator); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); + var index = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -2277,9 +2277,9 @@ require(\\"./taro\\"); }, config || {})); }, 7: function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(15); + module.exports = __webpack_require__(14); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -2304,7 +2304,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -2379,6 +2379,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2403,8 +2406,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2412,7 +2421,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2455,26 +2464,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -2493,8 +2487,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); function _arrayLikeToArray(arr, len) { @@ -3526,7 +3520,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(12); + var src_app = __webpack_require__(11); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -3555,7 +3549,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -3576,7 +3570,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); @@ -4605,13 +4599,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4622,13 +4616,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4641,13 +4635,13 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (qq[\\"webpackJsonp\\"] = qq[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"dependencies\\"; }, - 16: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -4688,7 +4682,7 @@ require(\\"./taro\\"); var regenerator_default = __webpack_require__.n(regenerator); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); + var index = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -4756,9 +4750,9 @@ require(\\"./taro\\"); }, config || {})); }, 7: function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(15); + module.exports = __webpack_require__(14); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -4783,7 +4777,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -4858,6 +4852,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -4882,8 +4879,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -4891,7 +4894,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -4934,26 +4937,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap index 45e20b030c32..c9b937682639 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/react.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(12); + var src_app = __webpack_require__(11); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); @@ -2099,13 +2099,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2116,13 +2116,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -2135,13 +2135,13 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"dependencies\\"; }, - 16: function(module, exports, __webpack_require__) {}, - 18: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, exports, __webpack_require__) {}, + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2182,7 +2182,7 @@ require(\\"./taro\\"); var regenerator_default = __webpack_require__.n(regenerator); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(16); + var index = __webpack_require__(15); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -2250,9 +2250,9 @@ require(\\"./taro\\"); }, config || {})); }, 7: function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(15); + module.exports = __webpack_require__(14); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -2277,7 +2277,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -2352,6 +2352,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2376,8 +2379,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2385,7 +2394,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2428,26 +2437,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap index fb784be4f911..928e603158b0 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/sass.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(11); + var src_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -1869,13 +1869,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1886,13 +1886,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1905,8 +1905,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1916,7 +1916,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1955,7 +1955,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -1971,20 +1971,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -2055,6 +2051,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2079,8 +2078,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2088,7 +2093,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2131,26 +2136,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -2169,8 +2159,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -3175,7 +3165,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(11); + var src_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -3204,7 +3194,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -3225,7 +3215,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -4024,13 +4014,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4041,13 +4031,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -4060,8 +4050,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -4071,7 +4061,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -4110,7 +4100,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -4126,20 +4116,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -4210,6 +4196,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -4234,8 +4223,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -4243,7 +4238,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -4286,26 +4281,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -4324,8 +4304,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -5330,7 +5310,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(11); + var src_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -5359,7 +5339,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -5380,7 +5360,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -6179,13 +6159,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -6196,13 +6176,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -6215,8 +6195,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -6226,7 +6206,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -6265,7 +6245,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -6281,20 +6261,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -6365,6 +6341,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -6389,8 +6368,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -6398,7 +6383,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -6441,26 +6426,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -6479,8 +6449,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -7485,7 +7455,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(11); + var src_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -7514,7 +7484,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -7535,7 +7505,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -8334,13 +8304,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -8351,13 +8321,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -8370,8 +8340,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -8381,7 +8351,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -8420,7 +8390,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -8436,20 +8406,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -8520,6 +8486,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -8544,8 +8513,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -8553,7 +8528,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -8596,26 +8571,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap index 11a38240a2b6..b8abb4f47bd2 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 5 ], { - 15: function(module, exports, __webpack_require__) {}, - 19: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, exports, __webpack_require__) {}, + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = __webpack_require__(1); @@ -1014,7 +1014,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(2); - var src_app = __webpack_require__(15); + var src_app = __webpack_require__(14); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1043,7 +1043,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(10); + var taro_react = __webpack_require__(9); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1068,7 +1068,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 19, 0, 1, 3, 2 ] ] ]); +}, [ [ 18, 0, 1, 3, 2 ] ] ]); @@ -1892,13 +1892,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 16: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 16, 0, 1 ] ] ]); +}, [ [ 15, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1909,13 +1909,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 17: function(module, __webpack_exports__, __webpack_require__) { + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 17, 0, 1 ] ] ]); +}, [ [ 16, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1930,8 +1930,8 @@ require(\\"./taro\\"); require(\\"../../sub-utils\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 9 ], { - 18: function(module, exports, __webpack_require__) {}, - 21: function(module, __webpack_exports__, __webpack_require__) { + 17: function(module, exports, __webpack_require__) {}, + 20: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1942,7 +1942,7 @@ require(\\"../../sub-utils\\"); var react = __webpack_require__(2); var taro_components = __webpack_require__(7); var common = __webpack_require__(8); - var detail = __webpack_require__(18); + var detail = __webpack_require__(17); var detail_Detail = function(_Component) { Object(inherits[\\"a\\"])(Detail, _Component); var _super = Object(createSuper[\\"a\\"])(Detail); @@ -1974,7 +1974,7 @@ require(\\"../../sub-utils\\"); } }, config || {})); } -}, [ [ 21, 0, 4, 1, 3, 2 ] ] ]); +}, [ [ 20, 0, 4, 1, 3, 2 ] ] ]); @@ -1992,7 +1992,7 @@ require(\\"../../sub-utils\\"); require(\\"../../sub-utils\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 11 ], { - 22: function(module, __webpack_exports__, __webpack_require__) { + 21: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2032,7 +2032,7 @@ require(\\"../../sub-utils\\"); } }, config || {})); } -}, [ [ 22, 0, 4, 1, 3, 2 ] ] ]); +}, [ [ 21, 0, 4, 1, 3, 2 ] ] ]); @@ -2045,7 +2045,7 @@ require(\\"../../sub-utils\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 13 ], { - 20: function(module, __webpack_exports__, __webpack_require__) { + 19: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -2094,7 +2094,7 @@ require(\\"../../sub-utils\\"); } }, config || {})); } -}, [ [ 20, 0, 1, 3, 2 ] ] ]); +}, [ [ 19, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -2125,13 +2125,13 @@ require(\\"../../sub-utils\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-runtime-mock\\"; }, - 10: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - }, 7: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; + }, + 9: function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } } ]); @@ -2204,6 +2204,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2228,8 +2231,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(9); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2237,7 +2246,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2280,26 +2289,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap index 1de543252949..1ef1a8f798fd 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/swan.spec.ts.snap @@ -17,8 +17,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -893,7 +893,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(12); + var src_app = __webpack_require__(11); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -922,7 +922,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -943,7 +943,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); @@ -1442,13 +1442,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1464,13 +1464,13 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (swan[\\"webpackJsonp\\"] = swan[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_exports__[\\"default\\"] = \\"dependencies\\"; }, - 15: function(module, exports, __webpack_require__) {}, - 17: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, exports, __webpack_require__) {}, + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1511,7 +1511,7 @@ require(\\"./taro\\"); var regenerator_default = __webpack_require__.n(regenerator); var react = __webpack_require__(1); var taro_components = __webpack_require__(2); - var index = __webpack_require__(15); + var index = __webpack_require__(14); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1579,9 +1579,9 @@ require(\\"./taro\\"); }, config || {})); }, 7: function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); + module.exports = __webpack_require__(13); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\"}} @@ -1603,7 +1603,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -1660,6 +1660,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1684,8 +1687,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1693,7 +1702,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1736,26 +1745,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap index 66d7348c7083..0b677094d8e9 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/tabbar.spec.ts.snap @@ -45,7 +45,7 @@ require(\\"./taro\\"); function processApis() {} var EMPTY_OBJ = {}; }, - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; (function(navigator) { var _tarojs_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); @@ -558,11 +558,11 @@ require(\\"./taro\\"); Object(_tarojs_shared__WEBPACK_IMPORTED_MODULE_0__[\\"e\\"])(components); }).call(this, __webpack_require__(0)[\\"navigator\\"]); }, - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); - var runtime = __webpack_require__(13); + var runtime = __webpack_require__(12); var taro_runtime = __webpack_require__(0); function _defineProperty(obj, key, value) { if (key in obj) { @@ -1214,7 +1214,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(2); - var src_app = __webpack_require__(14); + var src_app = __webpack_require__(13); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1243,7 +1243,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\", \\"pages/about/index\\" ], window: { @@ -1279,7 +1279,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); @@ -1426,13 +1426,13 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/custom-wrapper.js **/ (my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1443,7 +1443,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/pages/about/index.js **/ (my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 18: function(module, __webpack_exports__, __webpack_require__) { + 17: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1479,7 +1479,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 } }, config || {})); } -}, [ [ 18, 0, 1, 3, 2 ] ] ]); +}, [ [ 17, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/about/index.json **/ {\\"navigationBarTitleText\\":\\"关于\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\"}} @@ -1490,7 +1490,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/pages/index/index.js **/ (my[\\"webpackJsonp\\"] = my[\\"webpackJsonp\\"] || []).push([ [ 9 ], { - 17: function(module, __webpack_exports__, __webpack_require__) { + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1526,7 +1526,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 } }, config || {})); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\"}} @@ -1545,7 +1545,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -1602,6 +1602,9 @@ export default { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1626,8 +1629,14 @@ export default { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1635,7 +1644,7 @@ export default { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1678,26 +1687,11 @@ export default { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; @@ -1716,8 +1710,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 12: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -2722,7 +2716,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(1); - var src_app = __webpack_require__(12); + var src_app = __webpack_require__(11); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -2751,7 +2745,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\", \\"pages/about/index\\" ], window: { @@ -2787,7 +2781,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -3618,13 +3612,13 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -3635,13 +3629,13 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 14: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 14, 0, 1 ] ] ]); +}, [ [ 13, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -3654,7 +3648,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/pages/about/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 17: function(module, __webpack_exports__, __webpack_require__) { + 16: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -3690,7 +3684,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 } }, config || {})); } -}, [ [ 17, 0, 1, 3, 2 ] ] ]); +}, [ [ 16, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/about/index.json **/ {\\"navigationBarTitleText\\":\\"关于\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -3701,7 +3695,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 16: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -3737,7 +3731,7 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -3750,20 +3744,16 @@ h�hځ��r������Nb2��х��K~��>;;ːL�1 /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -3834,6 +3824,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -3858,8 +3851,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -3867,7 +3866,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -3910,26 +3909,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap index dab99bb825df..f4f247723275 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/ts.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 11: function(module, exports, __webpack_require__) {}, - 15: function(module, __webpack_exports__, __webpack_require__) { + 10: function(module, exports, __webpack_require__) {}, + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = \\"taro\\"; @@ -1020,7 +1020,7 @@ require(\\"./taro\\"); var oldDiffedHook, oldVNodeHook, runtime_options; } var mocks_react = __webpack_require__(5); - var src_app = __webpack_require__(11); + var src_app = __webpack_require__(10); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1049,7 +1049,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"Component\\"]); var lib_src_app = app_App; - var taro_react = __webpack_require__(8); + var taro_react = __webpack_require__(7); var app_config = { pages: [ \\"pages/index/index\\" ], window: { @@ -1070,7 +1070,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 15, 0, 1, 3, 2 ] ] ]); +}, [ [ 14, 0, 1, 3, 2 ] ] ]); @@ -1869,13 +1869,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 12: function(module, __webpack_exports__, __webpack_require__) { + 11: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 12, 0, 1 ] ] ]); +}, [ [ 11, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1886,13 +1886,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 13: function(module, __webpack_exports__, __webpack_require__) { + 12: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 13, 0, 1 ] ] ]); +}, [ [ 12, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1905,8 +1905,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 8 ], { - 14: function(module, exports, __webpack_require__) {}, - 16: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1916,7 +1916,7 @@ require(\\"./taro\\"); var createSuper = __webpack_require__(3); var react = __webpack_require__(5); var taro_components = __webpack_require__(6); - var index = __webpack_require__(14); + var index = __webpack_require__(13); var index_Index = function(_Component) { Object(inherits[\\"a\\"])(Index, _Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -1958,7 +1958,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 16, 0, 1, 3, 2 ] ] ]); +}, [ [ 15, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"comp\\":\\"../../comp\\"}} @@ -1974,20 +1974,16 @@ require(\\"./taro\\"); /** filePath: dist/taro.js **/ -(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - 0: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-runtime-mock\\"; - }, - 6: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - var _unused_webpack_default_export = \\"taro-components-mock\\"; - }, - 8: function(module, __webpack_exports__, __webpack_require__) { - \\"use strict\\"; - __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; - } -} ]); +(wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 1 ], [ function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-runtime-mock\\"; +}, , , , , , function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + var _unused_webpack_default_export = \\"taro-components-mock\\"; +}, function(module, __webpack_exports__, __webpack_require__) { + \\"use strict\\"; + __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; +} ] ]); /** filePath: dist/utils.wxs **/ module.exports = { @@ -2058,6 +2054,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2082,8 +2081,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2091,7 +2096,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2134,26 +2139,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, , , function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap b/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap index 7b3b0d6a1ad4..103cd580ebb4 100644 --- a/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap +++ b/packages/taro-mini-runner/src/__tests__/__snapshots__/wx-hybrid.spec.ts.snap @@ -14,8 +14,8 @@ require(\\"./vendors\\"); require(\\"./taro\\"); (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 4 ], { - 14: function(module, exports, __webpack_require__) {}, - 24: function(module, __webpack_exports__, __webpack_require__) { + 13: function(module, exports, __webpack_require__) {}, + 23: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var mocks_taro = __webpack_require__(1); @@ -857,7 +857,7 @@ require(\\"./taro\\"); var inherits = __webpack_require__(7); var createSuper = __webpack_require__(6); var mocks_react = __webpack_require__(2); - var src_app = __webpack_require__(14); + var src_app = __webpack_require__(13); var app_App = function(_React$Component) { Object(inherits[\\"a\\"])(App, _React$Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -886,7 +886,7 @@ require(\\"./taro\\"); return App; }(mocks_react[\\"default\\"].Component); var lib_src_app = app_App; - var taro_react = __webpack_require__(9); + var taro_react = __webpack_require__(8); var app_config = { pages: [ \\"pages/index/index\\", \\"pages/native/native\\" ], window: { @@ -907,7 +907,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 24, 0, 1, 3, 2 ] ] ]); +}, [ [ 23, 0, 1, 3, 2 ] ] ]); @@ -1859,13 +1859,13 @@ require(\\"./taro\\"); /** filePath: dist/comp.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 6 ], { - 15: function(module, __webpack_exports__, __webpack_require__) { + 14: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])()); } -}, [ [ 15, 0, 1 ] ] ]); +}, [ [ 14, 0, 1 ] ] ]); /** filePath: dist/comp.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1876,7 +1876,7 @@ require(\\"./taro\\"); /** filePath: dist/components/tab/tab.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 7 ], { - 22: function(module, exports) { + 21: function(module, exports) { Component({ behaviors: [], properties: { @@ -1910,7 +1910,7 @@ require(\\"./taro\\"); } }); } -}, [ [ 22, 0 ] ] ]); +}, [ [ 21, 0 ] ] ]); /** filePath: dist/components/tab/tab.json **/ {\\"component\\":true,\\"usingComponents\\":{}} @@ -1923,13 +1923,13 @@ require(\\"./taro\\"); /** filePath: dist/custom-wrapper.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 10 ], { - 16: function(module, __webpack_exports__, __webpack_require__) { + 15: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); Component(Object(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__[\\"createRecursiveComponentConfig\\"])(\\"custom-wrapper\\")); } -}, [ [ 16, 0, 1 ] ] ]); +}, [ [ 15, 0, 1 ] ] ]); /** filePath: dist/custom-wrapper.json **/ {\\"component\\":true,\\"usingComponents\\":{\\"comp\\":\\"./comp\\",\\"custom-wrapper\\":\\"./custom-wrapper\\"}} @@ -1942,8 +1942,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/index/index.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 11 ], { - 17: function(module, exports, __webpack_require__) {}, - 25: function(module, __webpack_exports__, __webpack_require__) { + 16: function(module, exports, __webpack_require__) {}, + 24: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); var taro_runtime = __webpack_require__(0); @@ -1954,7 +1954,7 @@ require(\\"./taro\\"); var taro = __webpack_require__(1); var react = __webpack_require__(2); var taro_components = __webpack_require__(3); - var index = __webpack_require__(17); + var index = __webpack_require__(16); var index_Index = function(_React$Component) { Object(inherits[\\"a\\"])(Index, _React$Component); var _super = Object(createSuper[\\"a\\"])(Index); @@ -2024,7 +2024,7 @@ require(\\"./taro\\"); } }, config || {})); } -}, [ [ 25, 0, 1, 3, 2 ] ] ]); +}, [ [ 24, 0, 1, 3, 2 ] ] ]); /** filePath: dist/pages/index/index.json **/ {\\"navigationBarTitleText\\":\\"首页\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"tab\\":\\"../../components/tab/tab\\",\\"comp\\":\\"../../comp\\"}} @@ -2038,8 +2038,8 @@ require(\\"./taro\\"); /** filePath: dist/pages/native/native.js **/ (wx[\\"webpackJsonp\\"] = wx[\\"webpackJsonp\\"] || []).push([ [ 13 ], { - 18: function(module, exports, __webpack_require__) { - var _require = __webpack_require__(19), add = _require.add; + 17: function(module, exports, __webpack_require__) { + var _require = __webpack_require__(18), add = _require.add; Page({ data: { text: \\"This is page data.\\", @@ -2062,7 +2062,7 @@ require(\\"./taro\\"); } }); }, - 19: function(module, __webpack_exports__, __webpack_require__) { + 18: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"add\\", (function() { @@ -2072,7 +2072,7 @@ require(\\"./taro\\"); return a + b; } } -}, [ [ 18, 0 ] ] ]); +}, [ [ 17, 0 ] ] ]); /** filePath: dist/pages/native/native.json **/ {\\"navigationBarBackgroundColor\\":\\"#ffffff\\",\\"navigationBarTextStyle\\":\\"black\\",\\"navigationBarTitleText\\":\\"混写页面示例\\",\\"backgroundColor\\":\\"#eeeeee\\",\\"backgroundTextStyle\\":\\"light\\",\\"usingComponents\\":{\\"custom-wrapper\\":\\"../../custom-wrapper\\",\\"tab\\":\\"../../components/tab/tab\\"}} @@ -2100,7 +2100,7 @@ require(\\"./taro\\"); \\"use strict\\"; var _unused_webpack_default_export = \\"taro-components-mock\\"; }, - 9: function(module, __webpack_exports__, __webpack_require__) { + 8: function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"a\\"] = \\"taro-react-mock\\"; } @@ -2175,6 +2175,9 @@ module.exports = { function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + writable: false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2199,8 +2202,14 @@ module.exports = { return false; } } - var helpers_typeof = __webpack_require__(8); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2208,7 +2217,7 @@ module.exports = { return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2251,26 +2260,11 @@ module.exports = { configurable: true } }); + Object.defineProperty(subClass, \\"prototype\\", { + writable: false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; } ] ]); " `; diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/babel.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/babel.spec.ts.snap index a7d4dd5c8425..53e053305f00 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/babel.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/babel.spec.ts.snap @@ -6,8 +6,8 @@ exports[`babel should convert do expressions 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`babel should convert do expressions 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -266,7 +266,7 @@ exports[`babel should convert do expressions 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -310,6 +310,9 @@ exports[`babel should convert do expressions 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -334,8 +337,14 @@ exports[`babel should convert do expressions 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -343,7 +352,7 @@ exports[`babel should convert do expressions 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -386,31 +395,16 @@ exports[`babel should convert do expressions 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -635,7 +629,7 @@ exports[`babel should convert do expressions 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -712,7 +706,7 @@ exports[`babel should convert do expressions 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -750,7 +744,7 @@ exports[`babel should convert do expressions 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -784,7 +778,7 @@ exports[`babel should convert do expressions 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap index 5820f7fa449a..8db5cb9e2a30 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/compiler-macros.spec.ts.snap @@ -6,8 +6,8 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -261,7 +261,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -305,6 +305,9 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -329,8 +332,14 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -338,7 +347,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -381,31 +390,16 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -630,7 +624,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -707,7 +701,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -745,7 +739,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -779,7 +773,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/config.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/config.spec.ts.snap index 075c9635287a..d0d4ad838846 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/config.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/config.spec.ts.snap @@ -6,8 +6,8 @@ exports[`config should build from origin and pipe to output 2`] = ` " /** filePath: output/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`config should build from origin and pipe to output 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -273,7 +273,7 @@ exports[`config should build from origin and pipe to output 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -317,6 +317,9 @@ exports[`config should build from origin and pipe to output 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -341,8 +344,14 @@ exports[`config should build from origin and pipe to output 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -350,7 +359,7 @@ exports[`config should build from origin and pipe to output 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -393,31 +402,16 @@ exports[`config should build from origin and pipe to output 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -642,7 +636,7 @@ exports[`config should build from origin and pipe to output 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -719,7 +713,7 @@ exports[`config should build from origin and pipe to output 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -757,7 +751,7 @@ exports[`config should build from origin and pipe to output 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -791,7 +785,7 @@ exports[`config should build from origin and pipe to output 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -816,8 +810,8 @@ exports[`config should copy assets 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -829,7 +823,7 @@ exports[`config should copy assets 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -1087,7 +1081,7 @@ I m irrelevant. jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -1131,6 +1125,9 @@ I m irrelevant. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1155,8 +1152,14 @@ I m irrelevant. return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1164,7 +1167,7 @@ I m irrelevant. return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1207,31 +1210,16 @@ I m irrelevant. \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -1456,7 +1444,7 @@ I m irrelevant. }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -1533,7 +1521,7 @@ I m irrelevant. var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1571,7 +1559,7 @@ I m irrelevant. function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -1605,7 +1593,7 @@ I m irrelevant. config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -1634,8 +1622,8 @@ exports[`config should resolved alias 2`] = ` " /** filePath: dist/chunk/2.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 2 ], { - \\"16\\": function(module, exports, __webpack_require__) {}, - \\"17\\": function(module, __webpack_exports__, __webpack_require__) { + \\"15\\": function(module, exports, __webpack_require__) {}, + \\"16\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -1647,7 +1635,7 @@ exports[`config should resolved alias 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -1901,7 +1889,7 @@ exports[`config should resolved alias 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -1945,6 +1933,9 @@ exports[`config should resolved alias 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1969,8 +1960,14 @@ exports[`config should resolved alias 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1978,7 +1975,7 @@ exports[`config should resolved alias 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2021,31 +2018,16 @@ exports[`config should resolved alias 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); + module.exports = __webpack_require__(13); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -2270,7 +2252,7 @@ exports[`config should resolved alias 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -2347,7 +2329,7 @@ exports[`config should resolved alias 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -2385,7 +2367,7 @@ exports[`config should resolved alias 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -2419,7 +2401,7 @@ exports[`config should resolved alias 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(2).then(__webpack_require__.bind(null, 17)); + return __webpack_require__.e(2).then(__webpack_require__.bind(null, 16)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -2500,12 +2482,12 @@ exports[`config should resolved alias 2`] = ` return Object.prototype.hasOwnProperty.call(object, property); }; __webpack_require__.p = \\"/\\"; - return __webpack_require__(__webpack_require__.s = 13); + return __webpack_require__(__webpack_require__.s = 12); })({ - \\"13\\": function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(15); + \\"12\\": function(module, exports, __webpack_require__) { + module.exports = __webpack_require__(14); }, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); function say() { diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap index c0c2843cd383..ae521a99d66b 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/css-modules.spec.ts.snap @@ -6,19 +6,19 @@ exports[`css modules should use css modules with global mode 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) { module.exports = { \\"cbody\\": \\"index-module__cbody___3Vfl2\\", \\"ctext\\": \\"index-module__ctext___Dq1RJ\\" }; }, - \\"15\\": function(module, exports, __webpack_require__) { + \\"14\\": function(module, exports, __webpack_require__) { module.exports = { \\"cwrapper\\": \\"index__cwrapper___oXrpd\\" }; }, - \\"16\\": function(module, exports, __webpack_require__) {}, - \\"17\\": function(module, __webpack_exports__, __webpack_require__) { + \\"15\\": function(module, exports, __webpack_require__) {}, + \\"16\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -30,11 +30,11 @@ exports[`css modules should use css modules with global mode 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_module_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_module_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_module_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_module_css__WEBPACK_IMPORTED_MODULE_6__); - var _index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15); + var _index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14); var _index_css__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_7__); - var _index_global_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(16); + var _index_global_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(15); var _index_global_css__WEBPACK_IMPORTED_MODULE_8___default = __webpack_require__.n(_index_global_css__WEBPACK_IMPORTED_MODULE_8__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -290,7 +290,7 @@ exports[`css modules should use css modules with global mode 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -334,6 +334,9 @@ exports[`css modules should use css modules with global mode 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -358,8 +361,14 @@ exports[`css modules should use css modules with global mode 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -367,7 +376,7 @@ exports[`css modules should use css modules with global mode 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -410,31 +419,16 @@ exports[`css modules should use css modules with global mode 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -659,7 +653,7 @@ exports[`css modules should use css modules with global mode 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -736,7 +730,7 @@ exports[`css modules should use css modules with global mode 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -774,7 +768,7 @@ exports[`css modules should use css modules with global mode 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -808,7 +802,7 @@ exports[`css modules should use css modules with global mode 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 17)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 16)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -833,15 +827,15 @@ exports[`css modules should use css modules with module mode 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) { module.exports = { \\"cbody\\": \\"index-module__cbody___3Vfl2\\", \\"ctext\\": \\"index-module__ctext___Dq1RJ\\" }; }, + \\"14\\": function(module, exports, __webpack_require__) {}, \\"15\\": function(module, exports, __webpack_require__) {}, - \\"16\\": function(module, exports, __webpack_require__) {}, - \\"17\\": function(module, __webpack_exports__, __webpack_require__) { + \\"16\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -853,11 +847,11 @@ exports[`css modules should use css modules with module mode 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_module_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_module_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_module_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_module_css__WEBPACK_IMPORTED_MODULE_6__); - var _index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15); + var _index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14); var _index_css__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_7__); - var _index_global_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(16); + var _index_global_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(15); var _index_global_css__WEBPACK_IMPORTED_MODULE_8___default = __webpack_require__.n(_index_global_css__WEBPACK_IMPORTED_MODULE_8__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -1113,7 +1107,7 @@ exports[`css modules should use css modules with module mode 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -1157,6 +1151,9 @@ exports[`css modules should use css modules with module mode 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1181,8 +1178,14 @@ exports[`css modules should use css modules with module mode 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1190,7 +1193,7 @@ exports[`css modules should use css modules with module mode 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1233,31 +1236,16 @@ exports[`css modules should use css modules with module mode 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -1482,7 +1470,7 @@ exports[`css modules should use css modules with module mode 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -1559,7 +1547,7 @@ exports[`css modules should use css modules with module mode 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1597,7 +1585,7 @@ exports[`css modules should use css modules with module mode 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -1631,7 +1619,7 @@ exports[`css modules should use css modules with module mode 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 17)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 16)); } }, { \\"navigationBarTitleText\\": \\"首页\\" diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap index 4fa73322e2c5..318f01ea17e7 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/nerv.spec.ts.snap @@ -6,8 +6,8 @@ exports[`nerv should build nerv app 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`nerv should build nerv app 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var nervjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -273,7 +273,7 @@ exports[`nerv should build nerv app 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_exports__[\\"b\\"] = \\"nervjs-mock\\"; @@ -316,6 +316,9 @@ exports[`nerv should build nerv app 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -340,8 +343,14 @@ exports[`nerv should build nerv app 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -349,7 +358,7 @@ exports[`nerv should build nerv app 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -392,31 +401,16 @@ exports[`nerv should build nerv app 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -641,7 +635,7 @@ exports[`nerv should build nerv app 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -718,7 +712,7 @@ exports[`nerv should build nerv app 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var nerv = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -756,7 +750,7 @@ exports[`nerv should build nerv app 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -790,7 +784,7 @@ exports[`nerv should build nerv app 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/react.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/react.spec.ts.snap index 8ba6c17eca66..10e74e8d0e12 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/react.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/react.spec.ts.snap @@ -6,8 +6,8 @@ exports[`react should build react app 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`react should build react app 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -273,7 +273,7 @@ exports[`react should build react app 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -317,6 +317,9 @@ exports[`react should build react app 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -341,8 +344,14 @@ exports[`react should build react app 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -350,7 +359,7 @@ exports[`react should build react app 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -393,31 +402,16 @@ exports[`react should build react app 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -642,7 +636,7 @@ exports[`react should build react app 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -719,7 +713,7 @@ exports[`react should build react app 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -757,7 +751,7 @@ exports[`react should build react app 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -791,7 +785,7 @@ exports[`react should build react app 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/sass.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/sass.spec.ts.snap index 821b70b3a8b7..027b635dec90 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/sass.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/sass.spec.ts.snap @@ -6,8 +6,8 @@ exports[`sass should build app with sass 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"13\\": function(module, exports, __webpack_require__) {}, - \\"14\\": function(module, __webpack_exports__, __webpack_require__) { + \\"12\\": function(module, exports, __webpack_require__) {}, + \\"13\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`sass should build app with sass 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_sass__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); + var _index_sass__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12); var _index_sass__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_sass__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -258,7 +258,7 @@ exports[`sass should build app with sass 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -302,6 +302,9 @@ exports[`sass should build app with sass 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -326,8 +329,14 @@ exports[`sass should build app with sass 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -335,7 +344,7 @@ exports[`sass should build app with sass 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -378,31 +387,16 @@ exports[`sass should build app with sass 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(12); + module.exports = __webpack_require__(11); }, function(module, exports, __webpack_require__) { - var api = __webpack_require__(9); - var content = __webpack_require__(10); + var api = __webpack_require__(8); + var content = __webpack_require__(9); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -627,7 +621,7 @@ exports[`sass should build app with sass 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(10); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -729,7 +723,7 @@ exports[`sass should build app with sass 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(8); + var mocks_taro_components = __webpack_require__(7); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -763,7 +757,7 @@ exports[`sass should build app with sass 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 13)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -788,8 +782,8 @@ exports[`sass should build app with scss 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -801,7 +795,7 @@ exports[`sass should build app with scss 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_scss__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_scss__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -1055,7 +1049,7 @@ exports[`sass should build app with scss 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -1099,6 +1093,9 @@ exports[`sass should build app with scss 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1123,8 +1120,14 @@ exports[`sass should build app with scss 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1132,7 +1135,7 @@ exports[`sass should build app with scss 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1175,31 +1178,16 @@ exports[`sass should build app with scss 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -1424,7 +1412,7 @@ exports[`sass should build app with scss 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -1501,7 +1489,7 @@ exports[`sass should build app with scss 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -1539,7 +1527,7 @@ exports[`sass should build app with scss 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -1573,7 +1561,7 @@ exports[`sass should build app with scss 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -1598,8 +1586,8 @@ exports[`sass should set global sass content with data 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -1611,7 +1599,7 @@ exports[`sass should set global sass content with data 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_scss__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_scss__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -1865,7 +1853,7 @@ exports[`sass should set global sass content with data 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -1909,6 +1897,9 @@ exports[`sass should set global sass content with data 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -1933,8 +1924,14 @@ exports[`sass should set global sass content with data 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -1942,7 +1939,7 @@ exports[`sass should set global sass content with data 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -1985,31 +1982,16 @@ exports[`sass should set global sass content with data 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -2234,7 +2216,7 @@ exports[`sass should set global sass content with data 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -2311,7 +2293,7 @@ exports[`sass should set global sass content with data 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -2349,7 +2331,7 @@ exports[`sass should set global sass content with data 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -2383,7 +2365,7 @@ exports[`sass should set global sass content with data 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -2408,8 +2390,8 @@ exports[`sass should set global sass content with source & dir 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -2421,7 +2403,7 @@ exports[`sass should set global sass content with source & dir 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_scss__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_scss__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -2675,7 +2657,7 @@ exports[`sass should set global sass content with source & dir 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -2719,6 +2701,9 @@ exports[`sass should set global sass content with source & dir 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -2743,8 +2728,14 @@ exports[`sass should set global sass content with source & dir 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -2752,7 +2743,7 @@ exports[`sass should set global sass content with source & dir 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -2795,31 +2786,16 @@ exports[`sass should set global sass content with source & dir 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -3044,7 +3020,7 @@ exports[`sass should set global sass content with source & dir 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -3121,7 +3097,7 @@ exports[`sass should set global sass content with source & dir 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -3159,7 +3135,7 @@ exports[`sass should set global sass content with source & dir 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -3193,7 +3169,7 @@ exports[`sass should set global sass content with source & dir 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" @@ -3218,8 +3194,8 @@ exports[`sass should set global sass content with source 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -3231,7 +3207,7 @@ exports[`sass should set global sass content with source 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_scss__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_scss__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -3485,7 +3461,7 @@ exports[`sass should set global sass content with source 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -3529,6 +3505,9 @@ exports[`sass should set global sass content with source 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -3553,8 +3532,14 @@ exports[`sass should set global sass content with source 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -3562,7 +3547,7 @@ exports[`sass should set global sass content with source 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -3605,31 +3590,16 @@ exports[`sass should set global sass content with source 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -3854,7 +3824,7 @@ exports[`sass should set global sass content with source 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -3931,7 +3901,7 @@ exports[`sass should set global sass content with source 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -3969,7 +3939,7 @@ exports[`sass should set global sass content with source 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -4003,7 +3973,7 @@ exports[`sass should set global sass content with source 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\" diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap index 13a3c5d42dbc..597f91db860c 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/subpackages.spec.ts.snap @@ -6,8 +6,8 @@ exports[`subpackages should process subpackages 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"16\\": function(module, exports, __webpack_require__) {}, - \\"18\\": function(module, __webpack_exports__, __webpack_require__) { + \\"15\\": function(module, exports, __webpack_require__) {}, + \\"17\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`subpackages should process subpackages 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16); + var _index_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15); var _index_css__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_6__); var Detail = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Detail, _Component); @@ -55,8 +55,8 @@ exports[`subpackages should process subpackages 2`] = ` /** filePath: dist/chunk/2.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 2 ], { - \\"15\\": function(module, exports, __webpack_require__) {}, - \\"17\\": function(module, __webpack_exports__, __webpack_require__) { + \\"14\\": function(module, exports, __webpack_require__) {}, + \\"16\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -69,7 +69,7 @@ exports[`subpackages should process subpackages 2`] = ` var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); var _tarojs_taro__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2); - var _index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15); + var _index_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14); var _index_css__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_7__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -333,7 +333,7 @@ exports[`subpackages should process subpackages 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 8); + return __webpack_require__(__webpack_require__.s = 7); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -381,6 +381,9 @@ exports[`subpackages should process subpackages 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -405,8 +408,14 @@ exports[`subpackages should process subpackages 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(7); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -414,7 +423,7 @@ exports[`subpackages should process subpackages 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -457,31 +466,16 @@ exports[`subpackages should process subpackages 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(14); + module.exports = __webpack_require__(13); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(11); - var content = __webpack_require__(12); + var api = __webpack_require__(10); + var content = __webpack_require__(11); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -706,7 +700,7 @@ exports[`subpackages should process subpackages 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(13); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -782,7 +776,7 @@ exports[`subpackages should process subpackages 2`] = ` var inherits = __webpack_require__(6); var createSuper = __webpack_require__(5); var react = __webpack_require__(0); - var app = __webpack_require__(9); + var app = __webpack_require__(8); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -820,7 +814,7 @@ exports[`subpackages should process subpackages 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(10); + var mocks_taro_components = __webpack_require__(9); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -858,14 +852,14 @@ exports[`subpackages should process subpackages 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(2).then(__webpack_require__.bind(null, 17)); + return __webpack_require__.e(2).then(__webpack_require__.bind(null, 16)); } }, { \\"navigationBarTitleText\\": \\"首页\\" }), Object.assign({ \\"path\\": \\"packageA/detail/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 18)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 17)); } }, { \\"navigationBarTitleText\\": \\"详情页\\" diff --git a/packages/taro-webpack-runner/src/__tests__/__snapshots__/ts.spec.ts.snap b/packages/taro-webpack-runner/src/__tests__/__snapshots__/ts.spec.ts.snap index c5b1dd6f2756..7d8640509ad0 100644 --- a/packages/taro-webpack-runner/src/__tests__/__snapshots__/ts.spec.ts.snap +++ b/packages/taro-webpack-runner/src/__tests__/__snapshots__/ts.spec.ts.snap @@ -6,8 +6,8 @@ exports[`typescript should build project with ts 2`] = ` " /** filePath: dist/chunk/1.js **/ (window[\\"webpackJsonp\\"] = window[\\"webpackJsonp\\"] || []).push([ [ 1 ], { - \\"14\\": function(module, exports, __webpack_require__) {}, - \\"15\\": function(module, __webpack_exports__, __webpack_require__) { + \\"13\\": function(module, exports, __webpack_require__) {}, + \\"14\\": function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, \\"default\\", (function() { @@ -19,7 +19,7 @@ exports[`typescript should build project with ts 2`] = ` var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0); var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1); - var _index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); + var _index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); var _index_less__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_6__); var Index = function(_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\\"a\\"])(Index, _Component); @@ -276,7 +276,7 @@ exports[`typescript should build project with ts 2`] = ` jsonpArray = jsonpArray.slice(); for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); var parentJsonpFunction = oldJsonpFunction; - return __webpack_require__(__webpack_require__.s = 7); + return __webpack_require__(__webpack_require__.s = 6); })([ function(module, __webpack_exports__, __webpack_require__) { \\"use strict\\"; __webpack_require__.r(__webpack_exports__); @@ -320,6 +320,9 @@ exports[`typescript should build project with ts 2`] = ` function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, \\"prototype\\", { + \\"writable\\": false + }); return Constructor; } }, function(module, __webpack_exports__, __webpack_require__) { @@ -344,8 +347,14 @@ exports[`typescript should build project with ts 2`] = ` return false; } } - var helpers_typeof = __webpack_require__(6); - var typeof_default = __webpack_require__.n(helpers_typeof); + function _typeof(obj) { + \\"@babel/helpers - typeof\\"; + return _typeof = \\"function\\" == typeof Symbol && \\"symbol\\" == typeof Symbol.iterator ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && \\"function\\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; + }, _typeof(obj); + } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\"this hasn't been initialised - super() hasn't been called\\"); @@ -353,7 +362,7 @@ exports[`typescript should build project with ts 2`] = ` return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof_default()(call) === \\"object\\" || typeof call === \\"function\\")) { + if (call && (_typeof(call) === \\"object\\" || typeof call === \\"function\\")) { return call; } else if (call !== void 0) { throw new TypeError(\\"Derived constructors may only return object or undefined\\"); @@ -396,31 +405,16 @@ exports[`typescript should build project with ts 2`] = ` \\"configurable\\": true } }); + Object.defineProperty(subClass, \\"prototype\\", { + \\"writable\\": false + }); if (superClass) _setPrototypeOf(subClass, superClass); } -}, function(module, exports) { - function _typeof(obj) { - \\"@babel/helpers - typeof\\"; - if (typeof Symbol === \\"function\\" && typeof Symbol.iterator === \\"symbol\\") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === \\"function\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\"symbol\\" : typeof obj; - }; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; - } - return _typeof(obj); - } - module.exports = _typeof; - module.exports[\\"default\\"] = module.exports, module.exports.__esModule = true; }, function(module, exports, __webpack_require__) { - module.exports = __webpack_require__(13); + module.exports = __webpack_require__(12); }, function(module, exports, __webpack_require__) {}, function(module, exports, __webpack_require__) { - var api = __webpack_require__(10); - var content = __webpack_require__(11); + var api = __webpack_require__(9); + var content = __webpack_require__(10); content = content.__esModule ? content.default : content; if (typeof content === \\"string\\") { content = [ [ module.i, content, \\"\\" ] ]; @@ -645,7 +639,7 @@ exports[`typescript should build project with ts 2`] = ` }; }; }, function(module, exports, __webpack_require__) { - var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(12); + var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(11); exports = ___CSS_LOADER_API_IMPORT___(false); exports.push([ module.i, \\"\\", \\"\\" ]); module.exports = exports; @@ -722,7 +716,7 @@ exports[`typescript should build project with ts 2`] = ` var inherits = __webpack_require__(5); var createSuper = __webpack_require__(4); var react = __webpack_require__(0); - var app = __webpack_require__(8); + var app = __webpack_require__(7); var app_App = function(_Component) { Object(inherits[\\"a\\"])(App, _Component); var _super = Object(createSuper[\\"a\\"])(App); @@ -760,7 +754,7 @@ exports[`typescript should build project with ts 2`] = ` function taro_framework_createVueApp() {} function taro_framework_createVue3App() {} var taro_components = __webpack_require__(1); - var mocks_taro_components = __webpack_require__(9); + var mocks_taro_components = __webpack_require__(8); Object(taro_components[\\"c\\"])().then((function() { Object(taro_components[\\"d\\"])(taro_runtime_window); })); @@ -794,7 +788,7 @@ exports[`typescript should build project with ts 2`] = ` config.routes = [ Object.assign({ \\"path\\": \\"pages/index/index\\", \\"load\\": function load() { - return __webpack_require__.e(1).then(__webpack_require__.bind(null, 15)); + return __webpack_require__.e(1).then(__webpack_require__.bind(null, 14)); } }, { \\"navigationBarTitleText\\": \\"首页\\"