{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/1401","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/1401/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/1401/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/1401/events","html_url":"https://github.com/ant-design/ant-design/issues/1401","id":147945740,"number":1401,"title":"引入antd时打包后报missing ] after element list","user":{"login":"Joodysen","id":13410158,"avatar_url":"https://avatars.githubusercontent.com/u/13410158?v=3","gravatar_id":"","url":"https://api.github.com/users/Joodysen","html_url":"https://github.com/Joodysen","followers_url":"https://api.github.com/users/Joodysen/followers","following_url":"https://api.github.com/users/Joodysen/following{/other_user}","gists_url":"https://api.github.com/users/Joodysen/gists{/gist_id}","starred_url":"https://api.github.com/users/Joodysen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joodysen/subscriptions","organizations_url":"https://api.github.com/users/Joodysen/orgs","repos_url":"https://api.github.com/users/Joodysen/repos","events_url":"https://api.github.com/users/Joodysen/events{/privacy}","received_events_url":"https://api.github.com/users/Joodysen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-13T04:51:41Z","updated_at":"2016-04-13T09:31:22Z","closed_at":"2016-04-13T09:31:22Z","body":"### 做了一个服务器同构渲染的工程，不知道是不是配置问题，在客户端文件里引入antd打包完成后报错\r\n\r\n#### firefox报错(bundle.js)\r\n```\r\nSyntaxError: missing ] after element list\r\ndatePatterns: ['yyyy\\'骞碶'M\\'鏈圽'd\\'鏃' EEEE', 'yyyy\\'骞碶'M\\'鏈圽'd\\'鏃'', 'yyyy-M-d'...\r\n```\r\n#### webpack配置\r\n```\r\nvar path = require('path');\r\nvar webpack = require('webpack');\r\nvar publicPath = 'http://localhost:3004/';\r\nvar node_modules = path.resolve(__dirname, 'node_modules');\r\n\r\nmodule.exports = {\r\n    entry: [\r\n        'webpack-hot-middleware/client?reload=true',\r\n        path.resolve(__dirname, './src/client/index.js')\r\n    ],\r\n    resolve: {\r\n        extensions: ['', '.js', '.jsx']\r\n    },\r\n    output: {\r\n        path: path.resolve(__dirname, 'build'),\r\n        filename: 'bundle.js',\r\n        publicPath: publicPath\r\n    },\r\n    module: {\r\n        loaders: [\r\n            {\r\n                test: /\\.(js|jsx)$/,\r\n                loaders: ['babel?presets[]=react,presets[]=es2015'],\r\n                exclude: /node_modules/,\r\n\r\n            }, {\r\n                test: /\\.css$/, // Only .css files\r\n                loader: 'style!css' // Run both loaders\r\n            },\r\n            {\r\n                test: /\\.scss$/,\r\n                loader: 'style!css!sass'\r\n            }\r\n        ]\r\n    },\r\n    plugins: [\r\n        new webpack.optimize.OccurenceOrderPlugin(),\r\n        new webpack.HotModuleReplacementPlugin(),\r\n        new webpack.NoErrorsPlugin()\r\n    ]\r\n};\r\n```\r\n#### 客户端文件\r\n```\r\nimport 'babel-polyfill'\r\nimport React from 'react'\r\nimport { render } from 'react-dom'\r\nimport { Provider } from 'react-redux'\r\nimport routes from '../common/routes';\r\nimport { Router, Route, browserHistory } from 'react-router';\r\nimport configureStore from '../common/store/configureStore'\r\nimport App from \"../common/containers/App\";\r\nimport CounterPage from \"../common/containers/CounterPage\";\r\nimport DictPage from \"../common/containers/DictPage\";\r\nimport { Option } from 'antd';                                    //加上此项报错\r\n\r\nconst initialState = window.__INITIAL_STATE__\r\n\r\nconst store = configureStore(initialState)\r\n\r\nrender(\r\n    <Provider store={store}>\r\n        <Router history={browserHistory}>\r\n            <Route name=\"app\" path=\"/\" component={App}>\r\n                <Route path=\"counter\" component={CounterPage} />\r\n                <Route path=\"dict\" component={DictPage}/>\r\n            </Route>\r\n        </Router>\r\n    </Provider>,\r\n    document.getElementById('root')\r\n)\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/209334493","html_url":"https://github.com/ant-design/ant-design/issues/1401#issuecomment-209334493","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/1401","id":209334493,"user":{"login":"Joodysen","id":13410158,"avatar_url":"https://avatars.githubusercontent.com/u/13410158?v=3","gravatar_id":"","url":"https://api.github.com/users/Joodysen","html_url":"https://github.com/Joodysen","followers_url":"https://api.github.com/users/Joodysen/followers","following_url":"https://api.github.com/users/Joodysen/following{/other_user}","gists_url":"https://api.github.com/users/Joodysen/gists{/gist_id}","starred_url":"https://api.github.com/users/Joodysen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joodysen/subscriptions","organizations_url":"https://api.github.com/users/Joodysen/orgs","repos_url":"https://api.github.com/users/Joodysen/repos","events_url":"https://api.github.com/users/Joodysen/events{/privacy}","received_events_url":"https://api.github.com/users/Joodysen/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T09:31:22Z","updated_at":"2016-04-13T09:31:22Z","body":"不好意思，确实没有在index.html设置<meta charset=\"UTF-8\"/>，现在可以了"}}