Is it possibile to add the urlArgs to main file?
require.config({
urlArgs : "v=1.1"
});
<script data-main="js/main" src="js/require.js"></script>
Is it possibile to add the urlArgs to main file?
require.config({
urlArgs : "v=1.1"
});
<script data-main="js/main" src="js/require.js"></script>
Copyright © 2021 Jogjafile Inc.
Yes, here you call
require
before the script is loaded. In yourjs/main
module, you can for example :Or better separate the config into a dedicated module (as in this sample project )
UPDATE:
If you want the parameters to be appended to the load of
js/main
you shouldn't use thedata-main
attribute:or build the require object before loading as described in the doc (I don't know the exact syntax for the config).