UNPKG

@ctsj/build

Version:

一个基于webpack的打包工具

23 lines (21 loc) 466 B
const path = require('path'); /** * 工程的静态资源拷贝 * @param webpackConfig * @param plugins * @param runtimePath * @param val */ module.exports = function ({ webpackConfig, plugins, runtimePath, val }) { webpackConfig.plugins.push( new plugins.CopyWebpackPlugin({ patterns: [ { from: path.join(runtimePath, val || 'assets'), to: val || 'assets', toType: 'dir', }, ], }), ); };