vite-plugin-conditional-import

JSON →
library 0.1.7 ·javascript
verified Apr 27, 2026

A Vite plugin for conditionally importing modules based on environment, using file naming conventions (e.g., foo.client.js, foo.server.js). Version 0.1.7 is the current release; development appears to be in early stages. It supports both static and dynamic imports, and is inspired by vite-plugin-iso-import. Unlike build-time environment variable substitution, this plugin allows tree-shaking and import splitting per environment. Requires manual setup of define and currentEnv. Limited ecosystem adoption; use with caution for production.

total hits 11
actors 3 distinct systems
last hit 1d ago AhrefsBot
GPTBot
5
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · EC · 🇬🇧 United Kingdom