ソースを参照

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 =