Skip to content

Commit

Permalink
fix/env-var-in-vite-config
Browse files Browse the repository at this point in the history
  • Loading branch information
Lera24 committed Mar 1, 2024
1 parent d81d861 commit 530fecf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/components/the-crm-workspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import WtDarkModeSwitcher from '@webitel/ui-sdk/src/modules/Appearance/components/wt-dark-mode-switcher.vue';
const release = process.env.npm_package_version;;
const release = process.env.npm_package_version;
const build = import.meta.env.VITE_BUILD_NUMBER;
const store = useStore();
Expand Down
6 changes: 3 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import createSvgSpritePlugin from 'vite-plugin-svg-sprite';

// https://vitejs.dev/config/
export default ({ mode }) => {
// const env = loadEnv(mode, process.cwd(), '');
const env = loadEnv(mode, process.cwd(), '');

return defineConfig({
base: '/crm',
define: {
// 'process.env': JSON.parse(JSON.stringify(env)
// .replaceAll('VITE_', 'VUE_APP_')),
'process.env': JSON.parse(JSON.stringify(env)
.replaceAll('VITE_', 'VUE_APP_')),
},
server: {
host: true,
Expand Down

0 comments on commit 530fecf

Please sign in to comment.