New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

netlify-plugin-cache-nextjs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-plugin-cache-nextjs

Cache the Next.js build folder in Netlify builds.

  • 1.6.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Netlify Next.js cache

Cache the Next.js build folder in Netlify builds.

add to netlify npm downloads per week Build Status XO code style

A popular Netlify build plugin.

Usage

This is a Netlify build plugin, which will run during your Netlify builds. You can learn more about Netlify Build Plugins in the Netlify docs.

add to netlify

If you want to manually install the plugin add the following lines to your netlify.toml file:

[[plugins]]
package = "netlify-plugin-cache-nextjs"

Next, from your project's base directory, use yarn, npm, or any other Node.js package manager to add this plugin to devDependencies in package.json.

yarn add -D netlify-plugin-cache-nextjs

If you want to configure the plugin, you can do this in your netlify.toml file:

[[plugins]]
package = "netlify-plugin-cache-nextjs"
	# These options will cache the build directory at `${NETLIFY_BASE}/frontend/.next-build`
	[plugins.inputs]
	# The path to the build directory
	build_dir_path = "frontend"
	# Custom build directory if you aren't using `.next` (https://nextjs.org/docs/api-reference/next.config.js/setting-a-custom-build-directory)
	custom_build_dir_name = ".next-build"

Note: The [[plugins]] line is required for each plugin, even if you have other plugins in your netlify.toml file already.

Contributing

Prequisites

This project uses any Node.js version Netlify supports (8-13). For best results use the latest Node.js LTS version.

This project uses Yarn to install dependencies, although you can use another package manager like npm or pnpm.

yarn install
# or `npm install`
# or `pnpm install`

Building

Run the build script to compile and optimize the TypeScript code into the dist folder.

Style

This project uses Prettier and XO.

You can run Prettier in the project with this command:

yarn run style

You can run XO with this command:

yarn run lint

Note that XO will also error if you have TypeScript errors, not just if your formatting is incorrect.

Linting

This project uses XO (which uses ESLint and some plugins internally) to perform static analysis on the TypeScript. It reports things like unused variables or not following code conventions.

yarn run lint

Note that XO will also error if you have incorrect formatting, not just if your TypeScript code has errors.

Keywords

FAQs

Package last updated on 28 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc