We have been using RequireJS Optimizer in our deployment file for months now. Everything was working.
Basically what we are doing is the following:
We compile our Coffee scripts files
node %DEPLOYMENT_SOURCE%\build\node_modules\coffee-script\bin\coffee -co "%DEPLOYMENT_SOURCE%\src\Web\Scripts" "%DEPLOYMENT_SOURCE%\src\Web\Coffee"
Then we opitmize the js files into a single file using RequireJS:
node "%DEPLOYMENT_SOURCE%\build\node_modules\requirejs\bin\r.js" -o "%DEPLOYMENT_SOURCE%\build\build.js"
Locally, it works #1. But on Azure we have this error:
Cannot optimize network URL, skipping: //1.1.1.1.1/path/site/repository/src/Web/Scripts/dashboard/almond.js
Please note that I changed the IP and the paths.
I checked the documentation of RequireJS, and in fact it does not support network URLs when optimizing.
The same script was working a few days ago.
Anybody aware of changes in Azure that could have lead to this? Any workaround?
Thanks a lot
我通过在调用r.js时重写baseUrl使其工作:
node "%DEPLOYMENT_SOURCE%\build\node_modules\requirejs\bin\r.js" -o "%DEPLOYMENT_SOURCE%\build\build.js" baseUrl=%DEPLOYMENT_SOURCE%\src\Web\scripts
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.