unplugin-index-extension
v0.0.1
Published
Auto import './package/index.vue' by './package', just like './package/index.js'
Downloads
4
Readme
:tada: unplugin-index-extension
English | 简体中文
Have you ever been troubled by:
+ import JsChild from './Component'
+ import JSChildDirectly from './Component/index.js'
- import VueChild from './Component'
- import SvelteChild from './Component'
This plugin grants the ability to support more file extensions!
:memo: Install
For Vite:
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import IndexExt from 'unplugin-index-extension/vite'
// import IndexExt from 'unplugin-index-extension/esbuild'
// import IndexExt from 'unplugin-index-extension/rollup'
// import IndexExt from 'unplugin-index-extension/webpack'
export default defineConfig({
plugins: [
vue(),
IndexExt(),
],
})
Also support esbuild, rollup, webpack
, install in the same way.
First check
.vue
, then check.svelte
, and finally proceed with the default behavior.
License
MIT :heart: