Merge pull request #3570 from bluewave-labs/fix/vite-allowed-hosts
fix(client): allow configurable Vite allowed hosts
This commit is contained in:
1 file changed
+9
@@ -9,11 +9,20 @@ const __dirname = path.dirname(__filename);
|
||||
export default defineConfig(({}) => {
|
||||
let version = "3.6.1";
|
||||
|
||||
const allowedHosts = process.env.VITE_ALLOWED_HOSTS
|
||||
? process.env.VITE_ALLOWED_HOSTS.split(",").map((h) => h.trim())
|
||||
: true;
|
||||
|
||||
return {
|
||||
base: "/",
|
||||
plugins: [svgr(), react()],
|
||||
server: {
|
||||
host: true,
|
||||
allowedHosts,
|
||||
},
|
||||
preview: {
|
||||
host: true,
|
||||
allowedHosts,
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in new issue
Block a user