我想将两个变量($
和jQuery
)从jquery
包传递到persian-datepicker
. 所以我添加了$
andjQuery
作为persian-datepicker
. 我做的对吗?
但似乎browserify-shim
无法从单个包中导出一个变量。
任何想法?
我的package.json
:
...
"browser": {
"jquery": "./node_modules/jquery/dist/jquery.js",
"persian-datepicker": "./node_modules/persian-datepicker/dist/js/persian-datepicker-0.4.5.js",
},
"browserify-shim": {
"./node_modules/persian-datepicker/dist/js/persian-datepicker-0.4.5.js": {
"depends": [
"jquery:jQuery",
"jquery:$"
]
}
},
"browserify": {
"transform": [
"browserify-shim"
]
},
...