{"library":"rollup-plugin-svelte","title":"rollup-plugin-svelte","description":"Compile Svelte components with Rollup. Version 7.2.3 requires Rollup >=2.0.0 and Svelte >=3.5.0. This plugin translates .svelte files into JavaScript and CSS, and must be used alongside @rollup/plugin-node-resolve and typically @rollup/plugin-commonjs. Key features include preprocessing support, SSR compilation (generate: 'ssr'), custom element output, and flexible include/exclude filtering. The package ships TypeScript types. For new projects, the maintainers recommend using SvelteKit or Vite with vite-plugin-svelte instead.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-svelte"],"cli":null},"imports":["import svelte from 'rollup-plugin-svelte'","import svelte from 'rollup-plugin-svelte'","plugins: [svelte({ compilerOptions: { hydratable: true } })]"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport svelte from 'rollup-plugin-svelte';\nimport resolve from '@rollup/plugin-node-resolve';\nimport commonjs from '@rollup/plugin-commonjs';\n\nexport default {\n  input: 'src/main.js',\n  output: {\n    file: 'public/bundle.js',\n    format: 'iife',\n  },\n  plugins: [\n    svelte({\n      include: 'src/**/*.svelte',\n      compilerOptions: { dev: process.env.NODE_ENV !== 'production' },\n    }),\n    resolve({ browser: true, exportConditions: ['svelte'] }),\n    commonjs(),\n  ],\n};","lang":"javascript","description":"Basic Rollup config to compile Svelte components with the plugin, node-resolve, and commonjs. Includes include filter and dev mode.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}