handle copy plugin for global build

This commit is contained in:
Evan You
2018-01-07 18:55:55 -05:00
parent 7fa24a541d
commit 88ec3ec1ca

View File

@@ -100,6 +100,12 @@ module.exports = function createConfigPlugin (context, entry) {
config
.plugin('html')
.tap(() => [{ template: indexFile }])
// disable copy plugin if no public dir
if (!findExisting(context, ['public'])) {
console.log('deleting')
config.plugins.delete('copy')
}
})
}
}