webpack 打包后的代码的eval部分在ie11里面报错,chrome 和 firefox 是好的
这是报错部分:
/***/
"./node_modules/_resize-detector@0.1.6@resize-detector/esm/index.js": /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addListener; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return removeListener; });\nlet raf = null;\nfunction requestAnimationFrame (callback) {\n if (!raf) {\n raf = (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n function (callback) {\n return setTimeout(callback, 16)\n }\n ).bind(window);\n }\n return raf(callback)\n}\n\nlet caf = null;\nfunction cancelAnimationFrame (id) {\n if (!caf) {\n caf = (\n window.cancelAnimationFrame ||\n window.webkitCancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n function (id) {\n clearTimeout(id);\n }\n ).bind(window);\n }\n\n caf(id);\n}\n\nfunction createStyles (styleText) {\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (style.styleSheet) {\n style.styleSheet.cssText = styleText;\n } else {\n style.appendChild(document.createTextNode(styleText));\n }\n (document.querySelector('head') || document.body).appendChild(style);\n return style\n}\n\nfunction createElement (tagName, props = {}) {\n let elem = document.createElement(tagName);\n Object.keys(props).forEach(key => {\n elem[key] = props[key];\n });\n return elem\n}\n\nfunction getRenderInfo (elem) {\n if (!document.documentElement.contains(elem)) {\n return {\n detached: true,\n rendered: false\n }\n }\n\n let current = elem;\n while (current !== document) {\n if (getComputedStyle(current).display === 'none') {\n return {\n detached: false,\n rendered: false\n }\n }\n current = current.parentNode;\n }\n\n return {\n detached: false,\n rendered: true\n }\n}\n\nvar css = \".resize-triggers{visibility:hidden;opacity:0}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:\\\"\\\";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}\";\n\nlet total = 0;\nlet style = null;\n\nfunction addListener (elem, callback) {\n if (!elem.__resize_mutation_handler__) {\n elem.__resize_mutation_handler__ = handleMutation.bind(elem);\n }\n\n let listeners = elem.__resize_listeners__;\n\n if (!listeners) {\n elem.__resize_listeners__ = [];\n if (window.ResizeObserver) {\n let ro = new ResizeObserver(() => {\n if (!elem.__resize_observer_triggered__) {\n elem.__resize_observer_triggered__ = true;\n return\n }\n runCallbacks(elem);\n });\n\n // initially display none won't trigger ResizeObserver callback\n let { detached, rendered } = getRenderInfo(elem);\n elem.__resize_observer_triggered__ = detached === false && rendered === false;\n elem.__resize_observer__ = ro;\n ro.observe(elem);\n } else if (elem.attachEvent && elem.addEventListener) {\n // targeting IE9/10\n elem.__resize_legacy_resize_handler__ = function handleLegacyResize () {\n runCallbacks(elem);\n };\n elem.attachEvent('onresize', elem.__resize_legacy_resize_handler__);\n document.addEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);\n } else {\n if (!total) {\n style = createStyles(css);\n }\n initTriggers(elem);\n\n elem.__resize_rendered__ = getRenderInfo(elem).rendered;\n if (window.MutationObserver) {\n let mo = new MutationObserver(elem.__resize_mutation_handler__);\n mo.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n elem.__resize_mutation_observer__ = mo;\n }\n }\n }\n\n elem.__resize_listeners__.push(callback);\n total++;\n}\n\nfunction removeListener (elem, callback) {\n // targeting IE9/10\n if (elem.detachEvent && elem.removeEventListener) {\n elem.detachEvent('onresize', elem.__resize_legacy_resize_handler__);\n document.removeEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);\n return\n }\n\n let listeners = elem.__resize_listeners__;\n listeners.splice(listeners.indexOf(callback), 1);\n\n if (!listeners.length) {\n if (elem.__resize_observer__) {\n elem.__resize_observer__.unobserve(elem);\n elem.__resize_observer__.disconnect();\n elem.__resize_observer__ = null;\n } else {\n if (elem.__resize_mutation_observer__) {\n elem.__resize_mutation_observer__.disconnect();\n elem.__resize_mutation_observer__ = null;\n }\n elem.removeEventListener('scroll', handleScroll);\n elem.removeChild(elem.__resize_triggers__.triggers);\n elem.__resize_triggers__ = null;\n }\n elem.__resize_listeners__ = null;\n }\n\n if (!--total && style) {\n style.parentNode.removeChild(style);\n }\n}\n\nfunction getUpdatedSize (elem) {\n let { width, height } = elem.__resize_last__;\n let { offsetWidth, offsetHeight } = elem;\n if (offsetWidth !== width || offsetHeight !== height) {\n return {\n width: offsetWidth,\n height: offsetHeight\n }\n }\n return null\n}\n\nfunction handleMutation () {\n // `this` denotes the scrolling element\n let { rendered, detached } = getRenderInfo(this);\n if (rendered !== this.__resize_rendered__) {\n if (!detached && this.__resize_triggers__) {\n resetTriggers(this);\n this.addEventListener('scroll', handleScroll, true);\n }\n this.__resize_rendered__ = rendered;\n runCallbacks(this);\n }\n}\n\nfunction handleScroll () {\n // `this` denotes the scrolling element\n resetTriggers(this);\n if (this.__resize_raf__) {\n cancelAnimationFrame(this.__resize_raf__);\n }\n this.__resize_raf__ = requestAnimationFrame(() => {\n let updated = getUpdatedSize(this);\n if (updated) {\n this.__resize_last__ = updated;\n runCallbacks(this);\n }\n });\n}\n\nfunction runCallbacks (elem) {\n elem.__resize_listeners__.forEach(callback => {\n callback.call(elem);\n });\n}\n\nfunction initTriggers (elem) {\n let position = getComputedStyle(elem).position;\n if (position === 'static') {\n elem.style.position = 'relative';\n }\n\n elem.__resize_old_position__ = position;\n elem.__resize_last__ = {};\n\n let triggers = createElement('div', {\n className: 'resize-triggers'\n });\n let expand = createElement('div', {\n className: 'resize-expand-trigger'\n });\n let expandChild = createElement('div');\n let contract = createElement('div', {\n className: 'resize-contract-trigger'\n });\n expand.appendChild(expandChild);\n triggers.appendChild(expand);\n triggers.appendChild(contract);\n elem.appendChild(triggers);\n\n elem.__resize_triggers__ = {\n triggers,\n expand,\n expandChild,\n contract\n };\n\n resetTriggers(elem);\n elem.addEventListener('scroll', handleScroll, true);\n\n elem.__resize_last__ = {\n width: elem.offsetWidth,\n height: elem.offsetHeight\n };\n}\n\nfunction resetTriggers (elem) {\n let { expand, expandChild, contract } = elem.__resize_triggers__;\n\n // batch read\n let { scrollWidth: csw, scrollHeight: csh } = contract;\n let { offsetWidth: eow, offsetHeight: eoh, scrollWidth: esw, scrollHeight: esh } = expand;\n\n // batch write\n contract.scrollLeft = csw;\n contract.scrollTop = csh;\n expandChild.style.width = eow + 1 + 'px';\n expandChild.style.height = eoh + 1 + 'px';\n expand.scrollLeft = esw;\n expand.scrollTop = esh;\n}\n\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvX3Jlc2l6ZS1kZXRlY3RvckAwLjEuNkByZXNpemUtZGV0ZWN0b3IvZXNtL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL19yZXNpemUtZGV0ZWN0b3JAMC4xLjZAcmVzaXplLWRldGVjdG9yL2VzbS9pbmRleC5qcz9hMDg5Il0sInNvdXJjZXNDb250ZW50IjpbImxldCByYWYgPSBudWxsO1xuZnVuY3Rpb24gcmVxdWVzdEFuaW1hdGlvbkZyYW1lIChjYWxsYmFjaykge1xuICBpZiAoIXJhZikge1xuICAgIHJhZiA9IChcbiAgICAgIHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUgfHxcbiAgICAgIHdpbmRvdy53ZWJraXRSZXF1ZXN0QW5pbWF0aW9uRnJhbWUgfHxcbiAgICAgIHdpbmRvdy5tb3pSZXF1ZXN0QW5pbWF0aW9uRnJhbWUgfHxcbiAgICAgIGZ1bmN0aW9uIChjYWxsYmFjaykge1xuICAgICAgICByZXR1cm4gc2V0VGltZW91dChjYWxsYmFjaywgMTYpXG4gICAgICB9XG4gICAgKS5iaW5kKHdpbmRvdyk7XG4gIH1cbiAgcmV0dXJuIHJh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TtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/_resize-detector@0.1.6@resize-detector/esm/index.js\n");
/***/
})
报错截图:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个问题是babel-loader对vue-echarts编译不正确导致的,我放弃了vue-echarts直接使用echarts后没问题了。
我也遇到这个问题了,看了看vue-echarts源码,里面引入了resize-detector,就是这个里面的文件,babel-loader没有解析成功,我也放弃了vue-echarts,直接用了echarts,打算自己封装一下。