Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Merge pull request #25 from No-Struggle/master
Browse files Browse the repository at this point in the history
删除控制台的chunks @hyy1115  非常感谢!
  • Loading branch information
3lang3 authored Jul 8, 2017
2 parents 49730d3 + 5f461fe commit 5f4adda
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"presets": ["es2015", "stage-3", "react"]
}
},
"plugins": ["react-hot-loader/babel"]
"plugins": [
"react-hot-loader/babel",
"transform-runtime"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"devDependencies": {
"babel-core": "6.24.1",
"babel-loader": "^6.2.10",
"babel-polyfill": "6.23.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-3": "^6.17.0",
Expand Down
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ HashBundlePlugin.prototype.apply = (compiler) => {
};

const config = {
entry: ['babel-polyfill', path.resolve(__dirname, 'src')],
entry: [path.resolve(__dirname, 'src')],
output: {
filename: `${isProd ? '[hash].' : ''}[name].js`,
path: path.resolve(__dirname, 'build'),
Expand Down Expand Up @@ -99,6 +99,9 @@ const config = {
host: 'localhost',
port: Number(process.env.PORT) || 8080,
historyApiFallback: true,
stats: {
chunks: false
}
},
};

Expand All @@ -110,7 +113,6 @@ if (!isProd) {
'react-hot-loader/patch',
`webpack-dev-server/client?http://${config.devServer.host}:${config.devServer.port}`,
'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors
'babel-polyfill',
path.resolve(__dirname, 'src'),
];

Expand Down

0 comments on commit 5f4adda

Please sign in to comment.