gradido/admin/vue.config.js
MateuszMichalowski a87dca89dc
feat(admin): setup migration environment (#3328)
* initial dependency update with initial setup

* initial dependency update with initial setup

* lock update

* Revert "initial dependency update with initial setup"

This reverts commit aa71afc3eca20042a1e13066bee1730a15606dd2.

* admin - moved to vite

* feat(admin): migration packages update (#3327)

* bump apollo package

* extend vue config

* create useCreationMonths composable

* WIP

* temporary

* install dependencies

* adjust configs

* rework footer component

* remove not needed spaces,

* rework overview page

* rework component

* rework user search page

* rework navbar

* navbar adjustments

* add depenedencies

* style adjustment in footer

* composable adjustments

* update node version

* rework search and pagination

* feat(admin) - disable unit tests for migration time

* feat(admin) - update eslint

* wip on search user

* rework creation formular component

* feat(admin) - update eslint babel

* feat(admin) - change stylelint version, fix eslint errors

* feat(admin) - update dependency

* feat(admin) - update dependency

* feat(admin) - update dependency

* feat(admin) - update dependency

* feat(admin) - update dependency

* feat(admin) - update dependency

* feat(admin) - update dependency, update node

* feat(admin) - update icons

---------

Co-authored-by: Mateusz Michałowski <mateusz.michalowski@monterail.com>

---------

Co-authored-by: Kamila Lach <80581523+unnunhexium@users.noreply.github.com>
2024-07-24 10:49:33 +02:00

71 lines
2.0 KiB
JavaScript

const path = require('path')
const webpack = require('webpack')
const Dotenv = require('dotenv-webpack')
const StatsPlugin = require('stats-webpack-plugin')
const CONFIG = require('./src/config')
// vue.config.js
module.exports = {
devServer: {
port: CONFIG.PORT,
},
pluginOptions: {
i18n: {
locale: 'de',
fallbackLocale: 'de',
localeDir: 'locales',
enableInSFC: false,
enableLegacy: false,
},
},
lintOnSave: true,
publicPath: '/admin',
chainWebpack: (config) => {
config.resolve.alias.set('vue', '@vue/compat')
config.module
.rule('vue')
.use('vue-loader')
.tap((options) => {
return {
...options,
compilerOptions: {
compatConfig: {
MODE: 2,
},
},
}
})
},
configureWebpack: {
// Set up all the aliases we use in our app.
resolve: {
alias: {
assets: path.join(__dirname, 'src/assets'),
},
},
plugins: [
// .env and Environment Variables
new Dotenv(),
new webpack.DefinePlugin({
// Those are Environment Variables transmitted via Docker and are only available when defined here aswell
// 'process.env.DOCKER_WORKDIR': JSON.stringify(process.env.DOCKER_WORKDIR),
// 'process.env.BUILD_DATE': JSON.stringify(process.env.BUILD_DATE),
// 'process.env.BUILD_VERSION': JSON.stringify(process.env.BUILD_VERSION),
'import.meta.env.BUILD_COMMIT': JSON.stringify(CONFIG.BUILD_COMMIT),
// 'process.env.PORT': JSON.stringify(process.env.PORT),
}),
// generate webpack stats to allow analysis of the bundlesize
new StatsPlugin('webpack.stats.json'),
],
infrastructureLogging: {
level: 'info', // 'none' | 'error' | 'warn' | 'info' | 'log' | 'verbose'
},
},
css: {
// Enable CSS source maps.
sourceMap: CONFIG.NODE_ENV !== 'production',
},
outputDir: path.resolve(__dirname, './build'),
}