vite-plugin-resolve-adapter
This tool is capable of adapting file suffixes based on the environment when retrieving files, in order to differentiate between multiple environment logics. It is similar to Taro's environment adaptation solution, but implemented in Vite.
Features
- [x] support relative project file enable
- [x] enable node_modules file include suffix adapter
- [x] support alias path support suffix adapter
Try it now
pnpm i vite-plugin-resolve-adapter@latest
Usage
// vite.config.ts
import { defineConfig } from 'vite';
import resolveAdapter from 'vite-plugin-resolve-adapter';
export default defineConfig({
plugins: [resolveAdapter()],
});