Skip to content

Commit

Permalink
fix vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
ozieblo-michal committed Jun 11, 2024
1 parent 43d3f98 commit 271072e
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/frontend/my-app/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
// import { defineConfig, loadEnv } from 'vite';
// import react from '@vitejs/plugin-react';

// export default defineConfig(({ mode }) => {
// const env = loadEnv(mode, import.meta.env.VITE_MODE || '');

// return {
// plugins: [react()],
// build: {
// outDir: 'dist',
// },
// base: "/vitefast/",
// server: {
// proxy: {
// '/dummy': env.VITE_BACKEND_URL || 'http://localhost:80',
// },
// },
// };
// });



import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig(({ mode }) => {
const env = loadEnv(mode, import.meta.env.VITE_MODE || '');
// Załaduj zmienne środowiskowe na podstawie trybu
const env = loadEnv(mode, process.cwd());

return {
plugins: [react()],
Expand Down

0 comments on commit 271072e

Please sign in to comment.