const { WebpackManifestPlugin } = require('../compiled/webpack-manifest-plugin');
module.exports = async function addManifestPlugin(opts) {
const { config, userConfig } = opts;
if (userConfig.manifest) {
config.plugin('manifest-plugin').use(WebpackManifestPlugin, [
{
fileName: 'asset-manifest.json',
...userConfig.manifest,
},
]);
}
};
-
邓晓峰 authored80c1027b