react redux work in ie8

2017-05-19  本文已影响125人  mengxr

搭建项目

import 'babel-polyfill';
import 'console-polyfill';
import 'fetch-ie8';
import 'es6-promise';
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-sham.min.js"></script>
postLoaders: [
      {
        test: /\.js$/,
        loaders: ['es3ify-loader'],
      },
    ]
// ansiHTML.tags = {
//   get open() {
//     return _openTags;
//   },
//   get close() {
//     return _closeTags;
//   }
// };
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
new webpack.optimize.UglifyJsPlugin({
      compress: {
          screw_ie8: true, // React doesn't support IE8
          warnings: false
      },
      mangle: {
          screw_ie8: true
      },
      output: {
          comments: false,
          screw_ie8: true
      }
 })

主要包版本

"react": "^0.14.2",
"react-dom": "^0.14.2",
"react-router": "^1.0.3",
"redux": "^3.6.0",
"react-redux": "^3.1.2",
"redux-thunk": "^2.2.0"

参考资料


开发遇到的问题

上一篇下一篇

猜你喜欢

热点阅读