vite-plugin-auto-routes
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
`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'
}
}`
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.
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.