{"library":"rollup-plugin-modulepreload","title":"rollup-plugin-modulepreload","description":"Rollup plugin that adds modulepreload link tags to HTML files for dynamically imported chunks, improving loading performance by hinting the browser to preload ES modules before they are needed. Current version 2.0.0 (released 2021, maintained). Allows customization of which chunks to preload via a synchronous or asynchronous predicate, with default that preloads dynamic entry points and intermediate chunks with exports. Differentiates from generic HTML injectors by focusing specifically on modulepreload semantics and Rollup's chunk metadata.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-modulepreload"],"cli":null},"imports":["import modulepreload from 'rollup-plugin-modulepreload'","const modulepreload = require('rollup-plugin-modulepreload').default","import type { Options } from 'rollup-plugin-modulepreload'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import modulepreload from 'rollup-plugin-modulepreload';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'public/modules',\n    format: 'es',\n    entryFileNames: '[name]-[hash].js',\n    chunkFileNames: 'chunk-[hash].js',\n  },\n  plugins: [\n    modulepreload({\n      prefix: 'modules',\n      index: 'public/index.html',\n    })\n  ]\n};","lang":"typescript","description":"Demonstrates basic usage with Rollup config: sets up modulepreload for all chunks, writes <link modulepreload> tags into public/index.html.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}