You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works transparently for mopped & unmopped builds -- this is the intention and works for most cases. However, it does not provide an entry point for the developer to engage with the script loading process if they so choose.
Use Case
An application needs to load scripts from the file system. Node-webkit and cordova both offer enough access to the file system that the sources could be safely loaded directly from the device rather than from the server. If an application has 1000s of scripts, this can have a major effect on overall loading time. Further, any file loaded from the device can be removed from the appcache without affecting offline support.
Potential Solutions
Add ability to supply custom Loader to Require.makeLoader
Add delegate method to Require.loadScript to allow user to supply their own URL. For the file system use case, the developer could read the file, create a blob URL, and send that URL along to be assigned to the <script>
The text was updated successfully, but these errors were encountered:
MR forces script loading to occur by either XHR or
<script>
. This is most easily reviewable inRequire.makeLoader
https://github.com/montagejs/mr/blob/master/browser.js#L290-L310This works transparently for mopped & unmopped builds -- this is the intention and works for most cases. However, it does not provide an entry point for the developer to engage with the script loading process if they so choose.
Use Case
An application needs to load scripts from the file system. Node-webkit and cordova both offer enough access to the file system that the sources could be safely loaded directly from the device rather than from the server. If an application has 1000s of scripts, this can have a major effect on overall loading time. Further, any file loaded from the device can be removed from the appcache without affecting offline support.
Potential Solutions
Require.makeLoader
Require.loadScript
to allow user to supply their own URL. For the file system use case, the developer could read the file, create a blob URL, and send that URL along to be assigned to the<script>
The text was updated successfully, but these errors were encountered: