-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Labels
Description
Describe the bug
Rollup supports passing RegExp | RegExp[] to the external option, see https://rollupjs.org/configuration-options/#external
Vite doesn't. It only supports string[] | true. I need the regex variant for Deno support as dependencies typically have this format which includes the semver version: npm:preact@^10.27.1. The semver part is different among dependencies. To exclude all deps I would need something like /^npm:*/
Reproduction
Steps to reproduce
// vite.config.ts
import { defineConfig } from "vite";
export default defineConfig({
environments: {
ssr: {
resolve: {
external: [/^npm:*/],
},
},
},
});System Info
-Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.