浏览代码

build: warn invalid format in build script

Evan You 6 年之前
父节点
当前提交
c3e1c812e3
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      rollup.config.js

+ 5 - 0
rollup.config.js

@@ -68,6 +68,11 @@ if (process.env.NODE_ENV === 'production') {
 export default packageConfigs
 
 function createConfig(format, output, plugins = []) {
+  if (!output) {
+    console.log(require('chalk').yellow(`invalid format: "${format}"`))
+    process.exit(1)
+  }
+
   output.externalLiveBindings = false
 
   const isProductionBuild =