Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
43
node_modules/next/dist/esm/server/app-render/rsc/preloads.js
generated
vendored
Normal file
43
node_modules/next/dist/esm/server/app-render/rsc/preloads.js
generated
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
|
||||
Files in the rsc directory are meant to be packaged as part of the RSC graph using next-app-loader.
|
||||
|
||||
*/ import ReactDOM from 'react-dom';
|
||||
export function preloadStyle(href, crossOrigin, nonce) {
|
||||
const opts = {
|
||||
as: 'style'
|
||||
};
|
||||
if (typeof crossOrigin === 'string') {
|
||||
opts.crossOrigin = crossOrigin;
|
||||
}
|
||||
if (typeof nonce === 'string') {
|
||||
opts.nonce = nonce;
|
||||
}
|
||||
ReactDOM.preload(href, opts);
|
||||
}
|
||||
export function preloadFont(href, type, crossOrigin, nonce) {
|
||||
const opts = {
|
||||
as: 'font',
|
||||
type
|
||||
};
|
||||
if (typeof crossOrigin === 'string') {
|
||||
opts.crossOrigin = crossOrigin;
|
||||
}
|
||||
if (typeof nonce === 'string') {
|
||||
opts.nonce = nonce;
|
||||
}
|
||||
ReactDOM.preload(href, opts);
|
||||
}
|
||||
export function preconnect(href, crossOrigin, nonce) {
|
||||
const opts = {};
|
||||
if (typeof crossOrigin === 'string') {
|
||||
opts.crossOrigin = crossOrigin;
|
||||
}
|
||||
if (typeof nonce === 'string') {
|
||||
opts.nonce = nonce;
|
||||
}
|
||||
;
|
||||
ReactDOM.preconnect(href, opts);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=preloads.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue