vite-plugin-auto-routes icon indicating copy to clipboard operation
vite-plugin-auto-routes copied to clipboard

i use this plugin in my Vite project but it occurs error message: plugin.configureServer is not a function

Open NewNameArk opened this issue 4 years ago • 2 comments

`import vue from '@vitejs/plugin-vue'

/**

  • https://vitejs.dev/config/
  • @type {import('vite').UserConfig} */ const path = require("path") const viteAutoRoute = require('vite-plugin-auto-routes') console.log('__dirname',__dirname) console.log(path.resolve(__dirname, '/src')) export default { plugins: [ vue(), viteAutoRoute({ pagesDir: 'src/pages' }) ], alias: [ { find: '@', replacement: path.resolve(__dirname, '/src') } ], define: { 'globalVar1': '全局变量1' }
    }`

NewNameArk avatar Feb 08 '21 06:02 NewNameArk

Are you using Vite v2? I haven't added support for that yet. You might want to check out https://github.com/brattonross/vite-plugin-voie as that got a lot more traction than this library.

axwalker avatar Feb 08 '21 17:02 axwalker

Are you using Vite v2? I haven't added support for that yet. You might want to check out https://github.com/brattonross/vite-plugin-voie as that got a lot more traction than this library.

Yes, my vite's version is 2.0.0-beta.65 .Thank you for your reply and suggestion , I have used vite-plugin-pages (https://github.com/hannoeru/vite-plugin-pages ) instead. I found an article which is written in Chinese. In this article ,the author introduces the integral design of your plugin. By reading the article and the source code of your plugin I learned a lot. Thanks again.

NewNameArk avatar Feb 09 '21 01:02 NewNameArk