// Used to import all files under `src/views`// The built-in dynamic import of vite cannot meet the needs of importing all files under viewsimport glob from 'glob';import { Transform } from 'vite/dist/node/transform.js';function getPath(path: string) { const lastIndex = path.lastIndexOf('.'); if (lastIndex !== -1) { path = path.substring(0, lastIndex); } return path.replace('src/views', '');}const dynamicImportTransform = function (env: any = {}): Transform { return { test({ path }) { // Only convert the file