{"library":"rollup-plugin-static-import","title":"rollup-plugin-static-import","description":"Rollup plugin that copies imported files (e.g., SVG, SCSS) to the output directory while marking them as external in the bundle. Version 1.0.0 rewrites in TypeScript with type declarations. Best used with rollup's preserveModules option to keep imports tree-shakable. Unlike generic copy plugins, it integrates with rollup's watch mode and handles asset re-imports. Requires rollup ^1.20.0 || ^2.0.0 || ^3.0.0.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-static-import"],"cli":null},"imports":["import staticImport from 'rollup-plugin-static-import'","import type { StaticImportOptions } from 'rollup-plugin-static-import'","import { Plugin } from 'rollup'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport staticImport from 'rollup-plugin-static-import';\n\nexport default {\n  input: 'src/index.js',\n  preserveModules: true,\n  output: {\n    dir: 'dist',\n    format: 'esm'\n  },\n  plugins: [\n    staticImport({\n      include: ['src/**/*.svg', 'src/**/*.scss'],\n      exclude: ['src/**/*.test.*'],\n      baseDir: 'src'\n    })\n  ]\n};\n","lang":"javascript","description":"Configures rollup to copy SVG and SCSS files from src to dist, marking them as external so the consuming app bundles them.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}