Registry /
web-framework / vite-plugin-splash-screen
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–223 runs
build_error
glibcnode 18–223 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
splashScreen
✓ import { splashScreen } from 'vite-plugin-splash-screen'
✗ const splashScreen = require('vite-plugin-splash-screen')
Plugin is ESM-only; require() will fail.
hideSplashScreen
✓ import { hideSplashScreen } from 'vite-plugin-splash-screen/runtime'
✗ import { hideSplashScreen } from 'vite-plugin-splash-screen'
Runtime export is from a separate subpath to avoid bundling runtime code with the plugin config.
Shows how to configure the plugin with all options and hide the splash screen in a React app.
// vite.config.js
import { defineConfig } from 'vite';
import { splashScreen } from 'vite-plugin-splash-screen';
export default defineConfig({
plugins: [
splashScreen({
logoSrc: 'logo.svg', // place logo.svg in public/
backgroundColor: '#ffffff',
title: 'My App',
minDurationMs: 500,
style: 'line', // or 'default', 'spinner'
primaryColor: '#000000',
}),
],
});
// In your app (React example):
// App.tsx
import { useEffect } from 'react';
import { hideSplashScreen } from 'vite-plugin-splash-screen/runtime';
function App() {
useEffect(() => {
hideSplashScreen();
}, []);
return <div>App loaded</div>;
}
export default App;
Errors
Common errors & fixes
Error: The 'logoSrc' option is required.
Missing required 'logoSrc' option when calling splashScreen().
fixAdd logoSrc: 'path/to/logo.svg' to the plugin options.
TypeError: Cannot read properties of undefined (reading 'src')
Trying to import { hideSplashScreen } from the main package instead of runtime subpath.
fixImport from 'vite-plugin-splash-screen/runtime'.
Audit
Dependencies
No dependency data recorded yet.