Kaynağa Gözat

build: warn invalid format in build script

Evan You 6 yıl önce
ebeveyn
işleme
c3e1c812e3
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  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 =