WSL/SLF GitLab Repository
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
EnviDat
EnviDat-Frontend
Commits
cbae2f18
Commit
cbae2f18
authored
Oct 25, 2022
by
Haas
Browse files
fix(vite.config.js): fixed resolving of version from package.json
parent
8270d655
Pipeline
#1553
failed with stages
in 16 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
cbae2f18
...
...
@@ -674,7 +674,7 @@ export default {
dialogMessage
:
''
,
dialogCallback
:
()
=>
{},
redirectToDashboard
:
false
,
appVersion
:
process
.
env
.
VITE_VERSION
,
appVersion
:
import
.
meta
.
env
.
VITE_VERSION
,
showMenu
:
true
,
NavToolbarZIndex
:
1150
,
NavigationZIndex
:
1100
,
...
...
vite.config.js
View file @
cbae2f18
...
...
@@ -11,10 +11,10 @@ import { viteStaticCopy } from 'vite-plugin-static-copy';
import
ViteRequireContext
from
'
@originjs/vite-plugin-require-context
'
;
import
{
VitePluginFonts
}
from
'
vite-plugin-fonts
'
;
import
{
version
}
from
'
./package.json
'
;
// TODO exposing package.json to app is potential security risk
import
{
getFilesWithPrefix
}
from
'
./src/factories/enhancementsFactoryNode
'
;
const
version
=
process
.
env
.
npm_package_version
;
export
default
({
mode
})
=>
{
const
isProd
=
mode
===
'
production
'
...
...
@@ -92,6 +92,7 @@ export default ({ mode }) => {
],
define
:
{
'
process.env
'
:
loadEnv
(
mode
,
process
.
cwd
()),
'
import.meta.env.VITE_VERSION
'
:
JSON
.
stringify
(
version
),
},
optimizeDeps
:
{
include
:
[
'
vuetify
'
,
'
vuex-persist
'
],
...
...
@@ -113,6 +114,9 @@ export default ({ mode }) => {
cssCodeSplit
:
true
,
// sourcemap: true,
emptyOutDir
:
true
,
define
:
{
'
import.meta.env.VITE_VERSION
'
:
JSON
.
stringify
(
version
),
},
},
server
:
{
host
:
'
0.0.0.0
'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment