提交 c5c4bef9 编写于 作者: G Guy Bedford 提交者: Joe Haddad

fixup self-externalization

上级 40f6bdef
...@@ -5,6 +5,10 @@ const { basename, dirname, extname, join } = require('path') ...@@ -5,6 +5,10 @@ const { basename, dirname, extname, join } = require('path')
module.exports = function(task) { module.exports = function(task) {
// eslint-disable-next-line require-yield // eslint-disable-next-line require-yield
task.plugin('ncc', {}, function*(file, options) { task.plugin('ncc', {}, function*(file, options) {
if (options.externals && options.packageName) {
options.externals = { ...options.externals }
delete options.externals[options.packageName]
}
return ncc(join(__dirname, file.dir, file.base), { return ncc(join(__dirname, file.dir, file.base), {
filename: file.base, filename: file.base,
minify: true, minify: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册