feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell
- Introduced blog routing using Next.js App Router - Implemented dynamic [slug] pages for blog posts - Added MDX-based content loading via lib/posts - Integrated shared TopBar layout with navigation - Established clear content, lib and component separation
This commit is contained in:
60
apps/public-web/node_modules/next/dist/esm/client/app-bootstrap.js
generated
vendored
Normal file
60
apps/public-web/node_modules/next/dist/esm/client/app-bootstrap.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Before starting the Next.js runtime and requiring any module, we need to make
|
||||
* sure the following scripts are executed in the correct order:
|
||||
* - Polyfills
|
||||
* - next/script with `beforeInteractive` strategy
|
||||
*/ import { getAssetPrefix } from './asset-prefix';
|
||||
import { setAttributesFromProps } from './set-attributes-from-props';
|
||||
const version = "16.1.4";
|
||||
window.next = {
|
||||
version,
|
||||
appDir: true
|
||||
};
|
||||
function loadScriptsInSequence(scripts, hydrate) {
|
||||
if (!scripts || !scripts.length) {
|
||||
return hydrate();
|
||||
}
|
||||
return scripts.reduce((promise, [src, props])=>{
|
||||
return promise.then(()=>{
|
||||
return new Promise((resolve, reject)=>{
|
||||
const el = document.createElement('script');
|
||||
if (props) {
|
||||
setAttributesFromProps(el, props);
|
||||
}
|
||||
if (src) {
|
||||
el.src = src;
|
||||
el.onload = ()=>resolve();
|
||||
el.onerror = reject;
|
||||
} else if (props) {
|
||||
el.innerHTML = props.children;
|
||||
setTimeout(resolve);
|
||||
}
|
||||
document.head.appendChild(el);
|
||||
});
|
||||
});
|
||||
}, Promise.resolve()).catch((err)=>{
|
||||
console.error(err);
|
||||
// Still try to hydrate even if there's an error.
|
||||
}).then(()=>{
|
||||
hydrate();
|
||||
});
|
||||
}
|
||||
export function appBootstrap(hydrate) {
|
||||
const assetPrefix = getAssetPrefix();
|
||||
loadScriptsInSequence(self.__next_s, ()=>{
|
||||
// If the static shell is being debugged, skip hydration if the
|
||||
// `__nextppronly` query is present. This is only enabled when the
|
||||
// environment variable `__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING` is
|
||||
// set to `1`. Otherwise the following is optimized out.
|
||||
if (process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1') {
|
||||
const search = new URLSearchParams(window.location.search);
|
||||
if (search.get('__nextppronly') === 'fallback' || search.get('__nextppronly') === '1') {
|
||||
console.warn(`Skipping hydration due to __nextppronly=${search.get('__nextppronly')}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
hydrate(assetPrefix);
|
||||
});
|
||||
}
|
||||
|
||||
//# sourceMappingURL=app-bootstrap.js.map
|
||||
Reference in New Issue
Block a user