Table Of Contents

骑驴找蚂蚁

全干工程师

webpack React is not defined

 

const path = require("path");

const HtmlWebpackPlugin = require('html-webpack-plugin');

const webpack = require('webpack');

module.exports = {
    ...
    plugins: [
        new webpack.ProvidePlugin({
            "React": "react",
        }) //添加这句
    ]
    ...
};

留言