@alicloud/console-toolkit-plugin-react
Version:
console toolkit plugin for base react app
16 lines (15 loc) • 556 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.hmrPlugin = void 0;
var webpack = require("webpack");
var utils_1 = require("../../utils");
var path_1 = require("path");
function hmrPlugin(config) {
var webpackHotPath = require.resolve('webpack/package.json');
config
.resolve
.alias
.set('webpack/hot', (0, path_1.resolve)(webpackHotPath, '..', 'hot'));
(0, utils_1.createPlugin)(config, 'HotModuleReplacement', webpack.HotModuleReplacementPlugin);
}
exports.hmrPlugin = hmrPlugin;
;