[Solved] Vite Bulk Import import.meta.glob Error: ERR_ABORTED 403 (Forbidden)

Vite Bulk Import import.meta.glob Error: ERR_ABORTED 403 (Forbidden)

You need to set  Vite server.fs.strict to false

Vite restricts access to files outside the workspace root path.

import { defineConfig  } from 'vite'
 
export default defineConfig({
  base: './', //PATH
  plugins: [
    createVuePlugin()
  ],
  server: {
    port: 8002, // Set the service startup port number
    open: true, // Set whether to open the browser automatically when the service is started
    fs: {
        strict: false
    }
  }
})

Read More: