Run one file on variable = 1 but another file if variable =2?

前端 未结 0 1623

Is it possible to load and unload files dynamically based on a single variable. For instance:

if (variable === 1){
     require("file1.js");
   }else{
          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题