meowtec / vite-plugin-import

Modular import plugin for vite
MIT License
14 stars 3 forks source link

作者该升级一下依赖包啦 #11

Open ikangjie opened 2 years ago

ikangjie commented 2 years ago

unmet peer vite@2: found 3.1.7

Carefree-happy commented 2 years ago

same question, unmet peer vite@2: found 3.1.8

when i run build in react

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import importPlugin from "vite-plugin-import"

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react(),  importPlugin({
    babelImportPluginOptions:[
      {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: 'true'
      }
    ]
  })]
})

failed to load config from vite.config.js error during build: TypeError: importPlugin is not a function

meowtec commented 2 years ago

Please try https://github.com/Geocld/vite-plugin-importus