pnpm dev soll auf 127.0.0.1 statt localhost laufen.
This commit is contained in:
@@ -4,24 +4,27 @@ import tailwindcss from "@tailwindcss/vite";
|
|||||||
import tsconfigPaths from "vite-tsconfig-paths";
|
import tsconfigPaths from "vite-tsconfig-paths";
|
||||||
import { defineConfig, loadEnv } from "vite";
|
import { defineConfig, loadEnv } from "vite";
|
||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
if (process.env.QUESTS_INSIDE_STUDIO !== "true") {
|
if (process.env.QUESTS_INSIDE_STUDIO !== "true") {
|
||||||
// When app is run outside Quests, this ensure .env* files are loaded
|
// When app is run outside Quests, this ensure .env* files are loaded
|
||||||
// Removes need for VITE_ prefix in .env files for the server as well
|
// Removes need for VITE_ prefix in .env files for the server as well
|
||||||
const env = loadEnv(mode, process.cwd(), "");
|
const env = loadEnv(mode, process.cwd(), "");
|
||||||
process.env = env;
|
process.env = env;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
plugins: [
|
server: {
|
||||||
tsconfigPaths(),
|
host: "127.0.0.1",
|
||||||
react(),
|
},
|
||||||
tailwindcss(),
|
plugins: [
|
||||||
devServer({
|
tsconfigPaths(),
|
||||||
// Exclude client folder from server because we only client render and
|
react(),
|
||||||
// it interferes with image imports.
|
tailwindcss(),
|
||||||
exclude: [/src\/client\/.*/, ...defaultOptions.exclude],
|
devServer({
|
||||||
entry: "./src/server/index.ts",
|
// Exclude client folder from server because we only client render and
|
||||||
}),
|
// it interferes with image imports.
|
||||||
],
|
exclude: [/src\/client\/.*/, ...defaultOptions.exclude],
|
||||||
};
|
entry: "./src/server/index.ts",
|
||||||
});
|
}),
|
||||||
|
],
|
||||||
|
};
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user