0.0.1 • Published 1 year ago

unplugin-index-extension v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

: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:

0.0.1

1 year ago