Server render the main page
Also, add hashes to asset file names and use the "entry manifest" plugin in dev to get auto-reloading.
This commit is contained in:
116
public/systemjs@2.0.0/dist/extras/amd.js
vendored
Normal file
116
public/systemjs@2.0.0/dist/extras/amd.js
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Support for AMD loading
|
||||
*/
|
||||
(function (global) {
|
||||
const systemPrototype = System.constructor.prototype;
|
||||
|
||||
const emptyInstantiation = [[], function () { return {} }];
|
||||
|
||||
function unsupportedRequire () {
|
||||
throw new Error('AMD require not supported.');
|
||||
}
|
||||
|
||||
function unsupportedNamed () {
|
||||
throw new Error('Named AMD not supported.');
|
||||
}
|
||||
|
||||
const requireExportsModule = ['require', 'exports', 'module'];
|
||||
|
||||
// hook System.register to know the last declaration binding
|
||||
let lastRegisterDeclare;
|
||||
const systemRegister = systemPrototype.register;
|
||||
systemPrototype.register = function (deps, declare) {
|
||||
lastRegisterDeclare = declare;
|
||||
systemRegister.call(this, deps, declare);
|
||||
};
|
||||
|
||||
const getRegister = systemPrototype.getRegister;
|
||||
systemPrototype.getRegister = function () {
|
||||
const register = getRegister.call(this);
|
||||
// if its an actual System.register leave it
|
||||
if (register && register[1] === lastRegisterDeclare)
|
||||
return register;
|
||||
|
||||
// otherwise AMD takes priority
|
||||
// no registration -> attempt AMD detection
|
||||
if (!amdDefineDeps)
|
||||
return register || emptyInstantiation;
|
||||
|
||||
const exports = {};
|
||||
const module = { exports: exports };
|
||||
const depModules = [];
|
||||
const setters = [];
|
||||
let splice = 0;
|
||||
for (let i = 0; i < amdDefineDeps.length; i++) {
|
||||
const id = amdDefineDeps[i];
|
||||
const index = setters.length;
|
||||
if (id === 'require') {
|
||||
depModules[i] = unsupportedRequire;
|
||||
splice++;
|
||||
}
|
||||
else if (id === 'module') {
|
||||
depModules[i] = module;
|
||||
splice++;
|
||||
}
|
||||
else if (id === 'exports') {
|
||||
depModules[i] = exports;
|
||||
splice++;
|
||||
}
|
||||
else {
|
||||
// needed for ie11 lack of iteration scope
|
||||
const idx = i;
|
||||
setters.push(function (ns) {
|
||||
depModules[idx] = ns.default;
|
||||
});
|
||||
}
|
||||
if (splice)
|
||||
amdDefineDeps[index] = id;
|
||||
}
|
||||
if (splice)
|
||||
amdDefineDeps.length -= splice;
|
||||
const amdExec = amdDefineExec;
|
||||
const registration = [amdDefineDeps, function (_export) {
|
||||
_export('default', exports);
|
||||
return {
|
||||
setters: setters,
|
||||
execute: function () {
|
||||
_export('default', amdExec.apply(exports, depModules) || module.exports);
|
||||
}
|
||||
};
|
||||
}];
|
||||
amdDefineDeps = null;
|
||||
return registration;
|
||||
};
|
||||
let amdDefineDeps;
|
||||
let amdDefineExec;
|
||||
global.define = function (name, deps, execute) {
|
||||
// define('', [], function () {})
|
||||
if (typeof name === 'string') {
|
||||
if (amdDefineDeps) {
|
||||
amdDefineDeps = [];
|
||||
amdDefineExec = unsupportedNamed;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
name = deps;
|
||||
deps = execute;
|
||||
}
|
||||
}
|
||||
// define([], function () {})
|
||||
if (name instanceof Array) {
|
||||
amdDefineDeps = name;
|
||||
amdDefineExec = deps;
|
||||
}
|
||||
// define({})
|
||||
else if (typeof name === 'object') {
|
||||
amdDefineDeps = [];
|
||||
amdDefineExec = function () { return name };
|
||||
}
|
||||
// define(function () {})
|
||||
else if (typeof name === 'function') {
|
||||
amdDefineDeps = requireExportsModule;
|
||||
amdDefineExec = name;
|
||||
}
|
||||
};
|
||||
global.define.amd = {};
|
||||
})(typeof self !== 'undefined' ? self : global);
|
1
public/systemjs@2.0.0/dist/extras/amd.min.js
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/amd.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(e){const t=System.constructor.prototype,n=[[],function(){return{}}];function o(){throw new Error("AMD require not supported.")}function r(){throw new Error("Named AMD not supported.")}const i=["require","exports","module"];let u;const f=t.register;t.register=function(e,t){u=t,f.call(this,e,t)};const s=t.getRegister;let c,l;t.getRegister=function(){const e=s.call(this);if(e&&e[1]===u)return e;if(!c)return e||n;const t={},r={exports:t},i=[],f=[];let p=0;for(let e=0;e<c.length;e++){const n=c[e],u=f.length;if("require"===n)i[e]=o,p++;else if("module"===n)i[e]=r,p++;else if("exports"===n)i[e]=t,p++;else{const t=e;f.push(function(e){i[t]=e.default})}p&&(c[u]=n)}p&&(c.length-=p);const d=l,a=[c,function(e){return e("default",t),{setters:f,execute:function(){e("default",d.apply(t,i)||r.exports)}}}];return c=null,a},e.define=function(e,t,n){if("string"==typeof e){if(c)return c=[],void(l=r);e=t,t=n}e instanceof Array?(c=e,l=t):"object"==typeof e?(c=[],l=function(){return e}):"function"==typeof e&&(c=i,l=e)},e.define.amd={}}("undefined"!=typeof self?self:global);
|
1
public/systemjs@2.0.0/dist/extras/amd.min.js.map
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/amd.min.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["amd.js"],"names":["global","systemPrototype","System","constructor","prototype","emptyInstantiation","unsupportedRequire","Error","unsupportedNamed","requireExportsModule","lastRegisterDeclare","systemRegister","register","deps","declare","call","this","getRegister","amdDefineDeps","amdDefineExec","exports","module","depModules","setters","splice","i","length","id","index","idx","push","ns","default","amdExec","registration","_export","execute","apply","define","name","Array","amd","self"],"mappings":"CAGA,SAAWA,GACT,MAAMC,EAAkBC,OAAOC,YAAYC,UAErCC,EAAqB,CAAC,GAAI,WAAc,MAAO,KAErD,SAASC,IACP,MAAM,IAAIC,MAAM,8BAGlB,SAASC,IACP,MAAM,IAAID,MAAM,4BAGlB,MAAME,EAAuB,CAAC,UAAW,UAAW,UAGpD,IAAIC,EACJ,MAAMC,EAAiBV,EAAgBW,SACvCX,EAAgBW,SAAW,SAAUC,EAAMC,GACzCJ,EAAsBI,EACtBH,EAAeI,KAAKC,KAAMH,EAAMC,IAGlC,MAAMG,EAAchB,EAAgBgB,YAyDpC,IAAIC,EACAC,EAzDJlB,EAAgBgB,Y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57
public/systemjs@2.0.0/dist/extras/global.js
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* SystemJS global script loading support
|
||||
* Extra for the s.js build only
|
||||
* (Included by default in system.js build)
|
||||
*/
|
||||
(function (global) {
|
||||
|
||||
const systemJSPrototype = System.constructor.prototype;
|
||||
|
||||
function getLastGlobalProp () {
|
||||
// alternatively Object.keys(global).pop()
|
||||
// but this may be faster (pending benchmarks)
|
||||
let lastProp;
|
||||
for (let p in global)
|
||||
if (global.hasOwnProperty(p))
|
||||
lastProp = p;
|
||||
return lastProp;
|
||||
}
|
||||
|
||||
let lastGlobalProp;
|
||||
const impt = systemJSPrototype.import;
|
||||
systemJSPrototype.import = function (id, parentUrl) {
|
||||
lastGlobalProp = getLastGlobalProp();
|
||||
return impt.call(this, id, parentUrl);
|
||||
};
|
||||
|
||||
const emptyInstantiation = [[], function () { return {} }];
|
||||
|
||||
const getRegister = systemJSPrototype.getRegister;
|
||||
systemJSPrototype.getRegister = function () {
|
||||
const lastRegister = getRegister.call(this);
|
||||
if (lastRegister)
|
||||
return lastRegister;
|
||||
|
||||
// no registration -> attempt a global detection as difference from snapshot
|
||||
// when multiple globals, we take the global value to be the last defined new global object property
|
||||
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did
|
||||
// note in Edge, deleting and re-adding a global does not change its ordering
|
||||
const globalProp = getLastGlobalProp();
|
||||
if (lastGlobalProp === globalProp)
|
||||
return emptyInstantiation;
|
||||
|
||||
lastGlobalProp = globalProp;
|
||||
let globalExport;
|
||||
try {
|
||||
globalExport = global[globalProp];
|
||||
}
|
||||
catch (e) {
|
||||
return emptyInstantiation;
|
||||
}
|
||||
|
||||
return [[], function (_export) {
|
||||
return { execute: function () { _export('default', globalExport) } };
|
||||
}];
|
||||
};
|
||||
|
||||
})(typeof self !== 'undefined' ? self : global);
|
1
public/systemjs@2.0.0/dist/extras/global.min.js
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/global.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(t){const n=System.constructor.prototype;function e(){let n;for(let e in t)t.hasOwnProperty(e)&&(n=e);return n}let r;const o=n.import;n.import=function(t,n){return r=e(),o.call(this,t,n)};const c=[[],function(){return{}}],u=n.getRegister;n.getRegister=function(){const n=u.call(this);if(n)return n;const o=e();if(r===o)return c;let i;r=o;try{i=t[o]}catch(t){return c}return[[],function(t){return{execute:function(){t("default",i)}}}]}}("undefined"!=typeof self?self:global);
|
1
public/systemjs@2.0.0/dist/extras/global.min.js.map
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/global.min.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["global.js"],"names":["global","systemJSPrototype","System","constructor","prototype","getLastGlobalProp","lastProp","p","hasOwnProperty","lastGlobalProp","impt","import","id","parentUrl","call","this","emptyInstantiation","getRegister","lastRegister","globalProp","globalExport","e","_export","execute","self"],"mappings":"CAKA,SAAWA,GAEX,MAAMC,EAAoBC,OAAOC,YAAYC,UAE7C,SAASC,IAGP,IAAIC,EACJ,IAAK,IAAIC,KAAKP,EACRA,EAAOQ,eAAeD,KACxBD,EAAWC,GACf,OAAOD,EAGT,IAAIG,EACJ,MAAMC,EAAOT,EAAkBU,OAC/BV,EAAkBU,OAAS,SAAUC,EAAIC,GAEvC,OADAJ,EAAiBJ,IACVK,EAAKI,KAAKC,KAAMH,EAAIC,IAG7B,MAAMG,EAAqB,CAAC,GAAI,WAAc,MAAO,KAE/CC,EAAchB,EAAkBgB,YACtChB,EAAkBgB,YAAc,WAC9B,MAAMC,EAAeD,EAAYH,KAAKC,MACtC,GAAIG,EACF,OAAOA,EAMT,MAAMC,EAAad,IACnB,GAAII,IAAmBU,EACrB,OAAOH,EAGT,IAAII,EADJX,EAAiBU,EAEjB,IACEC,EAAepB,EAAOmB,GAExB,MAAOE,GACL,OAAOL,EAGT,MAAO,CAAC,GAAI,SAAUM,GACpB,MAAO,CAAEC,QAAS,WAAcD,EAAQ,UAAWF,QA/CvD,CAmDmB,oBAATI,KAAuBA,KAAOxB"}
|
48
public/systemjs@2.0.0/dist/extras/named-exports.js
vendored
Normal file
48
public/systemjs@2.0.0/dist/extras/named-exports.js
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Named exports support for legacy module formats in SystemJS 2.0
|
||||
*/
|
||||
(function () {
|
||||
const systemPrototype = System.constructor.prototype;
|
||||
|
||||
// hook System.register to know the last declaration binding
|
||||
let lastRegisterDeclare;
|
||||
const systemRegister = systemPrototype.register;
|
||||
systemPrototype.register = function (deps, declare) {
|
||||
lastRegisterDeclare = declare;
|
||||
systemRegister.call(this, deps, declare);
|
||||
};
|
||||
|
||||
const getRegister = systemPrototype.getRegister;
|
||||
systemPrototype.getRegister = function () {
|
||||
const register = getRegister.call(this);
|
||||
// if it is an actual System.register call, then its ESM
|
||||
// -> dont add named exports
|
||||
if (!register || register[1] === lastRegisterDeclare || register[1].length === 0)
|
||||
return register;
|
||||
|
||||
// otherwise it was provided by a custom instantiator
|
||||
// -> extend the registration with named exports support
|
||||
const registerDeclare = register[1];
|
||||
register[1] = function (_export, _context) {
|
||||
// hook the _export function to note the default export
|
||||
let defaultExport;
|
||||
const declaration = registerDeclare.call(this, function (name, value) {
|
||||
if (name === 'default')
|
||||
defaultExport = value;
|
||||
_export(name, value);
|
||||
}, _context);
|
||||
// hook the execute function
|
||||
const execute = declaration.execute;
|
||||
if (execute)
|
||||
declaration.execute = function () {
|
||||
execute.call(this);
|
||||
// do a bulk export of the default export object
|
||||
// to export all its names as named exports
|
||||
if (typeof defaultExport === 'object')
|
||||
_export(defaultExport);
|
||||
};
|
||||
return declaration;
|
||||
};
|
||||
return register;
|
||||
};
|
||||
})();
|
1
public/systemjs@2.0.0/dist/extras/named-exports.min.js
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/named-exports.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){const t=System.constructor.prototype;let e;const n=t.register;t.register=function(t,c){e=c,n.call(this,t,c)};const c=t.getRegister;t.getRegister=function(){const t=c.call(this);if(!t||t[1]===e||0===t[1].length)return t;const n=t[1];return t[1]=function(t,e){let c;const o=n.call(this,function(e,n){"default"===e&&(c=n),t(e,n)},e),s=o.execute;return s&&(o.execute=function(){s.call(this),"object"==typeof c&&t(c)}),o},t}}();
|
1
public/systemjs@2.0.0/dist/extras/named-exports.min.js.map
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/named-exports.min.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["named-exports.js"],"names":["systemPrototype","System","constructor","prototype","lastRegisterDeclare","systemRegister","register","deps","declare","call","this","getRegister","length","registerDeclare","_export","_context","defaultExport","declaration","name","value","execute"],"mappings":"CAGA,WACE,MAAMA,EAAkBC,OAAOC,YAAYC,UAG3C,IAAIC,EACJ,MAAMC,EAAiBL,EAAgBM,SACvCN,EAAgBM,SAAW,SAAUC,EAAMC,GACzCJ,EAAsBI,EACtBH,EAAeI,KAAKC,KAAMH,EAAMC,IAGlC,MAAMG,EAAcX,EAAgBW,YACpCX,EAAgBW,YAAc,WAC5B,MAAML,EAAWK,EAAYF,KAAKC,MAGlC,IAAKJ,GAAYA,EAAS,KAAOF,GAA8C,IAAvBE,EAAS,GAAGM,OAClE,OAAON,EAIT,MAAMO,EAAkBP,EAAS,GAqBjC,OApBAA,EAAS,GAAK,SAAUQ,EAASC,GAE/B,IAAIC,EACJ,MAAMC,EAAcJ,EAAgBJ,KAAKC,KAAM,SAAUQ,EAAMC,GAChD,YAATD,IACFF,EAAgBG,GAClBL,EAAQI,EAAMC,IACbJ,GAEGK,EAAUH,EAAYG,QAS5B,OARIA,IACFH,EAAYG,QAAU,WACpBA,EAAQX,KAAKC,MAGgB,iBAAlBM,GACTF,EAAQE,KAEPC,GAEFX,GA1CX"}
|
32
public/systemjs@2.0.0/dist/extras/transform.js
vendored
Normal file
32
public/systemjs@2.0.0/dist/extras/transform.js
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Support for a "transform" loader interface
|
||||
*/
|
||||
(function () {
|
||||
const systemJSPrototype = System.constructor.prototype;
|
||||
|
||||
const instantiate = systemJSPrototype.instantiate;
|
||||
systemJSPrototype.instantiate = function (url, parent) {
|
||||
if (url.slice(-5) === '.wasm')
|
||||
return instantiate.call(this, url, parent);
|
||||
|
||||
const loader = this;
|
||||
return fetch(url)
|
||||
.then(function (res) {
|
||||
if (!res.ok)
|
||||
throw new Error('Fetch error: ' + res.status + ' ' + res.statusText + (parent ? ' loading from ' + parent : ''));
|
||||
return res.text();
|
||||
})
|
||||
.then(function (source) {
|
||||
return loader.transform.call(this, url, source);
|
||||
})
|
||||
.then(function (source) {
|
||||
(0, eval)(source + '\n//# sourceURL=' + url);
|
||||
return loader.getRegister();
|
||||
});
|
||||
};
|
||||
|
||||
// Hookable transform function!
|
||||
systemJSPrototype.transform = function (_id, source) {
|
||||
return source;
|
||||
};
|
||||
})();
|
1
public/systemjs@2.0.0/dist/extras/transform.min.js
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/transform.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){const t=System.constructor.prototype,n=t.instantiate;t.instantiate=function(t,r){if(".wasm"===t.slice(-5))return n.call(this,t,r);const e=this;return fetch(t).then(function(t){if(!t.ok)throw new Error("Fetch error: "+t.status+" "+t.statusText+(r?" loading from "+r:""));return t.text()}).then(function(n){return e.transform.call(this,t,n)}).then(function(n){return(0,eval)(n+"\n//# sourceURL="+t),e.getRegister()})},t.transform=function(t,n){return n}}();
|
1
public/systemjs@2.0.0/dist/extras/transform.min.js.map
vendored
Normal file
1
public/systemjs@2.0.0/dist/extras/transform.min.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["transform.js"],"names":["systemJSPrototype","System","constructor","prototype","instantiate","url","parent","slice","call","this","loader","fetch","then","res","ok","Error","status","statusText","text","source","transform","eval","getRegister","_id"],"mappings":"CAGA,WACE,MAAMA,EAAoBC,OAAOC,YAAYC,UAEvCC,EAAcJ,EAAkBI,YACtCJ,EAAkBI,YAAc,SAAUC,EAAKC,GAC7C,GAAsB,UAAlBD,EAAIE,OAAO,GACb,OAAOH,EAAYI,KAAKC,KAAMJ,EAAKC,GAErC,MAAMI,EAASD,KACf,OAAOE,MAAMN,GACZO,KAAK,SAAUC,GACd,IAAKA,EAAIC,GACP,MAAM,IAAIC,MAAM,gBAAkBF,EAAIG,OAAS,IAAMH,EAAII,YAAcX,EAAS,kBAAoBA,EAAS,KAC/G,OAAOO,EAAIK,SAEZN,KAAK,SAAUO,GACd,OAAOT,EAAOU,UAAUZ,KAAKC,KAAMJ,EAAKc,KAEzCP,KAAK,SAAUO,GAEd,OADA,EAAIE,MAAMF,EAAS,mBAAqBd,GACjCK,EAAOY,iBAKlBtB,EAAkBoB,UAAY,SAAUG,EAAKJ,GAC3C,OAAOA,GA1BX"}
|
Reference in New Issue
Block a user