是否有可能从服务中获取您的路径?因为我有以下错误:
cause: ReferenceError: serviceFactory is not defined
这是我尝试做的事情:
require.config
paths:
vScript:
do ->
service = serviceFactory.getService()
if !service
throw new Error 'not configured.'
url = service.getScriptUrl()
return url = 'https://test.com/js/test.1.min'
shim:
vScript:
exports: 'v'
require ['vScript'], ->
_alreadyLoaded = true