mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
0a4047ab31
Unfortunately the babel minify-mangle plugin seems to be abandoned and in certain circumstances can be very buggy. The only safe options are to disable it, or to switch to a different minification library. Not minifying our javascript is not ideal, so this commit updates the javascript tasks to use a rollup, combined with babel, and terser. Babel still converts code from ES/UMD/AMD to AMD modules with the relevant browser support, whilst terser minifies the code. The rollup bundler handles tracking and creation of sourcemaps, and supports better parallelisation of the tasks. Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core and eslint, which change the built files anyway, this seems like the ideal time to make this change.
16 lines
724 B
JavaScript
16 lines
724 B
JavaScript
/**
|
|
* Simple API for set/get to sessionstorage, with cacherev expiration.
|
|
*
|
|
* Session storage will only persist for as long as the browser window
|
|
* stays open.
|
|
*
|
|
* See:
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
|
|
*
|
|
* @module core/sessionstorage
|
|
* @copyright 2017 Ryan Wyllie <ryan@moodle.com>
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
*/
|
|
define("core/sessionstorage",["core/config","core/storagewrapper"],(function(config,StorageWrapper){var storage=new StorageWrapper(window.sessionStorage);return{get:function(key){return storage.get(key)},set:function(key,value){return storage.set(key,value)}}}));
|
|
|
|
//# sourceMappingURL=sessionstorage.min.js.map
|