小编Яро*_*лав的帖子

bundle.js 加载缓慢

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)

有什么方法可以加快加载速度吗?

javascript load bundle web webpack

5
推荐指数
1
解决办法
2292
查看次数

标签 统计

bundle ×1

javascript ×1

load ×1

web ×1

webpack ×1