我在Internet Explorer 11中的React + Redux项目中遇到语法错误,但我不知道为什么会导致它.
我正在使用Webpack和Babel来编译它.
我尝试使用babel-polyfill和babel-es6-polyfill,但这没有帮助.
这是我得到的错误:
SCRIPT1002: Syntax error
File: app.js, Line: 70, Column: 1
Run Code Online (Sandbox Code Playgroud)
第70行第1列是evalWebpack的开头:
/***/ }),
/* 21 */,
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.define... <- Line 70
^--- Column 1
Run Code Online (Sandbox Code Playgroud)
这是我的webpack.config.js:
'use strict';
// Include modules and plugins
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
// App and build directories
const APP_DIR = path.resolve(__dirname, 'src/');
const BUILD_DIR = path.resolve(__dirname, 'public');
// …Run Code Online (Sandbox Code Playgroud)