我在我的项目中使用“定义”。当我不使用优化器时,我的 js 代码会正常工作。当我运行优化器时,所有文件都包含在下面
require(["jquery", "modals", "registermodule", "bootstrap", "personsmodule", "datemodule", "./jquery-ui-1.8.18.custom.min"], function($) {});
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/main-built.js
----------------
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/jquery.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/modals.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/ajaxmodule.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/jquery-ui-1.8.18.custom.min.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/datemodule.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/validationmodule.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/guimodule.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/registration_util.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/registermodule.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/bootstrap.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/tablesort.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/personsmodule.js
C:/Users/pethel/checkout/src/main/webapp/resources/scripts/main.js
当我用丑陋的脚本加载我的页面时,我得到 datepicker 未定义。当文件包含在这里 jquery-ui-1.8.18.custom.min.js 时,怎么会发生这种情况?