Default: (sourcePath) => sourcePath.includes('node_modules').Type: false | (sourcePath: string, sourcemapPath: string) => boolean.Js export default defineConfig ( ) server.sourcemapIgnoreList incognito).īROWSER and BROWSER_ARGS are also special environment variables you can set in the. You can also set p _ARGS to pass additional arguments (e.g. If you want to open the server in a specific browser you like, you can set the env p (e.g. When the value is a string, it will be used as the URL's pathname. server.open Īutomatically open the app in the browser on server start. But we recommend creating your own certificates. For a basic setup, you can add to the project plugins, which will automatically create and cache a self-signed certificate.
The value can also be an options object passed to https.createServer().Ī valid certificate is needed. Note this downgrades to TLS only when the server.proxy option is also used. Set to true to exit if port is already in use, instead of automatically trying the next available port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. When running Vite on WSL2, it is not sufficient to set host: true to access the server from your LAN. Accessing the server on WSL2 from your LAN