소스 검색

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 =