{"action":"created","issue":{"url":"https://api.github.com/repos/ant-tool/atool-build/issues/182","repository_url":"https://api.github.com/repos/ant-tool/atool-build","labels_url":"https://api.github.com/repos/ant-tool/atool-build/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/ant-tool/atool-build/issues/182/comments","events_url":"https://api.github.com/repos/ant-tool/atool-build/issues/182/events","html_url":"https://github.com/ant-tool/atool-build/issues/182","id":164241472,"number":182,"title":"IE9 css文件大于250K(左右)，加载不完全 ，能否在编译的时候css文件过大编译成多个文件？","user":{"login":"pengxiaobao","id":13134663,"avatar_url":"https://avatars.githubusercontent.com/u/13134663?v=3","gravatar_id":"","url":"https://api.github.com/users/pengxiaobao","html_url":"https://github.com/pengxiaobao","followers_url":"https://api.github.com/users/pengxiaobao/followers","following_url":"https://api.github.com/users/pengxiaobao/following{/other_user}","gists_url":"https://api.github.com/users/pengxiaobao/gists{/gist_id}","starred_url":"https://api.github.com/users/pengxiaobao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengxiaobao/subscriptions","organizations_url":"https://api.github.com/users/pengxiaobao/orgs","repos_url":"https://api.github.com/users/pengxiaobao/repos","events_url":"https://api.github.com/users/pengxiaobao/events{/privacy}","received_events_url":"https://api.github.com/users/pengxiaobao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-07T06:52:09Z","updated_at":"2016-07-07T08:03:25Z","closed_at":null,"body":"Hi,  在尝试项目升级过程中，遇到了IE9加载css加载不完全。 原本编译的`index.css`文件时`259kb` , 升级后为`585kb`\r\n\r\n## 希望能提供一些帮助建议?\r\n\r\n### 网上搜索问题是IE9的问题\r\n[http://ju.outofmemory.cn/entry/168599](http://ju.outofmemory.cn/entry/168599)\r\n\r\n### 升级：\r\n`react 0.13` `=>` `react 14`\r\n`antd 0.9` `=>`  `antd 1.6`\r\n`antd-bin` ` => `  `atool-build 0.7.13`\r\n\r\n### 升级做的事情\r\n a. 修改`package.json`\r\n``` package.json\r\n\"dependencies\": {\r\n    \"antd\": \"^1.6.1\",\r\n    \"atool-build\": \"^0.7.1\",\r\n    \"babel-plugin-antd\": \"^0.4.0\",\r\n    \"babel-plugin-transform-runtime\": \"^6.8.0\",\r\n    \"babel-runtime\": \"^6.6.1\",\r\n    \"classnames\": \"^2.2.3\",\r\n    \"component-emitter\": \"1.2.0\",\r\n    \"console-polyfill\": \"^0.2.2\",\r\n    \"es3ify-loader\": \"^0.2.0\",\r\n    \"glob\": \"^7.0.5\",\r\n    \"history\": \"^2.0.1\",\r\n    \"isomorphic-fetch\": \"^2.2.1\",\r\n    \"jquery\": \"^2.2.4\",\r\n    \"jquery-mousewheel\": \"^3.1.13\",\r\n    \"js-cookie\": \"^2.1.1\",\r\n    \"jsuri\": \"^1.3.1\",\r\n    \"object-assign\": \"~4.0.1\",\r\n    \"rc-animate\": \"1.2.9\",\r\n    \"rc-form-validation\": \"^2.5.0\",\r\n    \"rc-queue-anim\": \"^0.11.11\",\r\n    \"rc-tree\": \"0.16.1\",\r\n    \"rc-upload\": \"1.6.6\",\r\n    \"react\": \"0.14.x\",\r\n    \"react-dom\": \"0.14.x\",\r\n    \"react-router\": \"2.3.x\",\r\n    \"react-redux\": \"4.4.x\",\r\n    \"react-router-redux\": \"^4.0.1\",\r\n    \"reduce-component\": \"1.0.1\",\r\n    \"redux\": \"^3.5.2\",\r\n    \"redux-actions\": \"0.9.x\",\r\n    \"redux-saga\": \"^0.10.4\",\r\n    \"velocity-animate\": \"1.2.2\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"atool-test-mocha\": \"^0.1.4\",\r\n    \"babel-eslint\": \"^6.0.2\",\r\n    \"dora\": \"0.3.x\",\r\n    \"dora-plugin-browser-history\": \"^0.1.1\",\r\n    \"dora-plugin-livereload\": \"^0.4.0\",\r\n    \"dora-plugin-proxy\": \"^0.6.1\",\r\n    \"dora-plugin-webpack\": \"0.6.x\",\r\n    \"dora-plugin-webpack-hmr\": \"^0.1.0\",\r\n    \"eslint\": \"^2.10.1\",\r\n    \"eslint-config-airbnb\": \"^9.0.1\",\r\n    \"eslint-plugin-import\": \"^1.8.0\",\r\n    \"eslint-plugin-jsx-a11y\": \"^1.2.0\",\r\n    \"eslint-plugin-react\": \"^5.1.1\",\r\n    \"expect\": \"^1.20.1\",\r\n    \"glob\": \"^7.0.3\",\r\n    \"pre-commit\": \"1.x\",\r\n    \"redbox-react\": \"^1.2.2\"\r\n  },\r\n  \"pre-commit\": [\r\n    \"lint\"\r\n  ],\r\n  \"scripts\": {\r\n    \"build\": \"atool-build\",\r\n    \"lint\": \"eslint --ext .js,.jsx src/\",\r\n    \"start\": \"dora -p 8001 --plugins   \\\"webpack,proxy,browser-history?index=/src/entries/index.html\\\"\",\r\n    \"test\": \"atool-test-mocha ./src/**/__tests__/*-test.js\"\r\n  }\r\n```\r\nb. 修改`webpack`\r\n ```\r\n\r\nconst webpack = require('atool-build/lib/webpack');\r\nconst fs = require('fs');\r\nconst path = require('path');\r\nconst glob = require('glob');\r\n\r\nmodule.exports = function(webpackConfig) {\r\n  webpackConfig.babel.plugins.push('transform-runtime');\r\n  webpackConfig.babel.plugins.push(['antd', {\r\n    style: 'css',  // if true, use less\r\n  }]);\r\n\r\n  // Enable this if you have to support IE8.\r\n  webpackConfig.module.loaders.unshift({\r\n    test: /\\.jsx?$/,\r\n    loader: 'es3ify-loader',\r\n  });\r\n\r\n  webpackConfig.devtool = null;\r\n  return webpackConfig;\r\n};\r\n```\r\n\r\nc. 修改项目依赖的`antd api`\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ant-tool/atool-build/issues/comments/231010239","html_url":"https://github.com/ant-tool/atool-build/issues/182#issuecomment-231010239","issue_url":"https://api.github.com/repos/ant-tool/atool-build/issues/182","id":231010239,"user":{"login":"afc163","id":507615,"avatar_url":"https://avatars.githubusercontent.com/u/507615?v=3","gravatar_id":"","url":"https://api.github.com/users/afc163","html_url":"https://github.com/afc163","followers_url":"https://api.github.com/users/afc163/followers","following_url":"https://api.github.com/users/afc163/following{/other_user}","gists_url":"https://api.github.com/users/afc163/gists{/gist_id}","starred_url":"https://api.github.com/users/afc163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afc163/subscriptions","organizations_url":"https://api.github.com/users/afc163/orgs","repos_url":"https://api.github.com/users/afc163/repos","events_url":"https://api.github.com/users/afc163/events{/privacy}","received_events_url":"https://api.github.com/users/afc163/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T08:03:25Z","updated_at":"2016-07-07T08:03:25Z","body":"如果用了 babel-plugin-antd，就不需要再手动引用样式了。你可能这里引重复了。"}}
{"actor":{"display_login":"afc163"}}