Rocky_Mountain_Vending/.pnpm-store/v10/files/82/d97ea188b20c9d0470b71fe87de0d2f86fab87332894349f21ffc083529ce987fb6eed8411f1c1baef748d7e6ae1e2f797d03d05f7063d6c9872fb7ae58283
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

32 lines
No EOL
1.5 KiB
Text

import { webpack } from 'next/dist/compiled/webpack/webpack';
export default class ForceCompleteRuntimePlugin {
apply(compiler) {
compiler.hooks.thisCompilation.tap('ForceCompleteRuntimePlugin', (compilation)=>{
// Ensure that each chunk uses the complete Webpack runtime.
// That way soft nav to a new page has the full runtime available
// by the time the chunk loads.
// This is a workaround until we can get Webpack to include runtime updates
// in the Flight response or the Flight Client to wait for HMR updates.
compilation.hooks.afterChunks.tap({
name: 'ForceCompleteRuntimePlugin'
}, (chunks)=>{
for (const chunk of chunks){
compilation.chunkGraph.addChunkRuntimeRequirements(chunk, this.allSharedRuntimeGlobals);
break;
}
});
});
}
constructor(){
this.allSharedRuntimeGlobals = new Set([
// List is incomplete. These are the globals that are not commonly in the
// Webpack runtime but may show up during after Client navs.
// If you ever get "__webpack_require__.X is not a function" or similar,
// check https://github.com/webpack/webpack/blob/0f84d1e3bf69915dc060f23ced9dfa468a884a42/lib/RuntimeGlobals.js
// for which one it is and add it here.
webpack.RuntimeGlobals.compatGetDefaultExport
]);
}
}
//# sourceMappingURL=force-complete-runtime.js.map