Transforms any file type (e.g., SVG, CSS, text) into an imported string in Vite. Currently at version 1.0.3, stable but minimal maintenance. Differentiates from raw-loader or ?raw suffix by offering a plugin-based approach with regex match and exclude patterns, allowing selective file transformation without query strings.
npm install vite-plugin-rawNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configure vite-plugin-raw to import SVG files as strings, excluding node_modules.
Use specific regex like /\.(svg|txt)$/ and add exclude patterns for directories.
Use path.resolve(__dirname, 'dir') for exclude entries.
Use static import statements for transformed files.
Use `import vitePluginRaw from 'vite-plugin-raw'`
Run `npm install -D vite-plugin-raw`
Check that the plugin is added to Vite config and match regex covers .svg.
No dependency data recorded yet.