"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const copy_webpack_plugin_1 = __importDefault(require("copy-webpack-plugin"));
const webpack_merge_1 = __importDefault(require("webpack-merge"));
/**
 * Hot Module Replacement support
 * @param config
 * @param builder
 */
const CopyAssets = (options = { assetsDir: 'assets' }) => (config, builder) => {
    return webpack_merge_1.default(config, {
        plugins: [
            new copy_webpack_plugin_1.default([{
                    from: builder.configs.publicPath,
                    to: `${builder.configs.outputPath}/${options.assetsDir}`
                }])
        ]
    });
};
exports.default = CopyAssets;
//# sourceMappingURL=CopyAssets.js.map