不确定我哪里出错了。这是我的用于捆绑客户端的 webpack.prod。但有些类名没有出现在我的 html 中
const path = require('path');
const webpack = require('webpack');
const dependencies = require('./package.json');
const ManifestPlugin = require('webpack-manifest-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const VENDOR_LIBS = [];
Object.entries(dependencies.dependencies).forEach(([key, value]) => {
VENDOR_LIBS.push(key);
});
const BrowserConfig = {
entry: {
bundle: './src/index',
vendor: VENDOR_LIBS,
},
output: {
path: path.resolve('./dist'),
publicPath: '/',
filename: '[name].js',
pathinfo: true,
},
resolve: {
extensions: ['.js', '.jsx', '.json', '.scss', '.css'],
},
module: {
rules: [
{
use: ['react-hot-loader/webpack', 'babel-loader'],
test: /\.(js|jsx)$/,
exclude: …Run Code Online (Sandbox Code Playgroud)