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

Commit 5f4adda

Browse files
authored
Merge pull request #25 from No-Struggle/master
删除控制台的chunks @hyy1115 非常感谢!
2 parents 49730d3 + 5f461fe commit 5f4adda

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
"presets": ["es2015", "stage-3", "react"]
66
}
77
},
8-
"plugins": ["react-hot-loader/babel"]
8+
"plugins": [
9+
"react-hot-loader/babel",
10+
"transform-runtime"
11+
]
912
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"devDependencies": {
5555
"babel-core": "6.24.1",
5656
"babel-loader": "^6.2.10",
57-
"babel-polyfill": "6.23.0",
57+
"babel-plugin-transform-runtime": "^6.23.0",
5858
"babel-preset-es2015": "^6.18.0",
5959
"babel-preset-react": "^6.16.0",
6060
"babel-preset-stage-3": "^6.17.0",

webpack.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ HashBundlePlugin.prototype.apply = (compiler) => {
3030
};
3131

3232
const config = {
33-
entry: ['babel-polyfill', path.resolve(__dirname, 'src')],
33+
entry: [path.resolve(__dirname, 'src')],
3434
output: {
3535
filename: `${isProd ? '[hash].' : ''}[name].js`,
3636
path: path.resolve(__dirname, 'build'),
@@ -99,6 +99,9 @@ const config = {
9999
host: 'localhost',
100100
port: Number(process.env.PORT) || 8080,
101101
historyApiFallback: true,
102+
stats: {
103+
chunks: false
104+
}
102105
},
103106
};
104107

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

0 commit comments

Comments
 (0)