Skip to content

Demo app exploring reducing runtime JavaScript via custom page scripts

Notifications You must be signed in to change notification settings

agerard-godaddy/next-custom-entries-demo

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

This app demonstrates the use of custom entries and scripts to reduce the runtime JavaScript needed for high-content pages with low interactivity.

Getting Started

Custom entries do not work with hot-reload. To run the app with custom entries enabled:

npm run build
npm run start

Hot reload does still work with the app during the development stages:

npm run dev

See it work

On the various pages, with the Network tab open, perform a reload to notice the reduced JavaScript resources download, and resulting button interactivity.

webpackFinal

Today, we cannot fully experiment with Webpack configuration because of Next.js internals. On install, this app monkey-patches Next.js to introduce a webpackFinal config method, allowing us to experiment with the final Webpack config.

A proposal has been submitted to Next.js for this to be a resident feature: Original Pull Request moved to Issue Discussion

About

Demo app exploring reducing runtime JavaScript via custom page scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published