bundle.js (2.4 Mb) 加载需要 40 秒 - 1.5 分钟:
这是我的webpack.config.js
:
const webpack = require('webpack');
const config = {
entry: {
"App":__dirname + '/js/App.jsx'
},
output: {
path: __dirname + '/dist',
filename: 'bundle.js',
},
resolve: {
extensions: ['.js', '.jsx', '.css']
},
module: {
rules: [
{
test: /\.jsx?/,
exclude: /node_modules/,
use: 'babel-loader',
loader: 'babel-loader?cashezdirectory'
},
// { test: /\.css$/, loader: 'style-loader!css-loader' }
]
},
externals: {
react: 'React',
jquery: 'jQuery'}
};
module.exports = config;
Run Code Online (Sandbox Code Playgroud)
有什么方法可以加快加载速度吗?