mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
do not transform rquire context when not in test mode
This commit is contained in:
parent
0384bdd0ee
commit
79aeb8affb
@ -1,4 +1,15 @@
|
||||
module.exports = {
|
||||
presets: ['@babel/preset-env'],
|
||||
plugins: ['transform-require-context'],
|
||||
module.exports = function (api) {
|
||||
api.cache(true)
|
||||
|
||||
const presets = ['@babel/preset-env']
|
||||
const plugins = []
|
||||
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
plugins.push('transform-require-context')
|
||||
}
|
||||
|
||||
return {
|
||||
presets,
|
||||
plugins,
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,11 +4,9 @@ import VueI18n from 'vue-i18n'
|
||||
Vue.use(VueI18n)
|
||||
|
||||
const loadLocaleMessages = () => {
|
||||
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
|
||||
console.log(locales)
|
||||
const locales = require.context('./locales/', true, /[A-Za-z0-9-_,\s]+\.json$/i)
|
||||
const messages = {}
|
||||
locales.keys().forEach((key) => {
|
||||
console.log(key)
|
||||
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
|
||||
if (matched && matched.length > 1) {
|
||||
const locale = matched[1]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"open_creations":"offene Schöpfungen",
|
||||
"not_open_creations":"keine offene Schöpfungen"
|
||||
"not_open_creations": "keine offene Schöpfungen",
|
||||
"open_creations": "offene Schöpfungen"
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"open_creations":"open creations",
|
||||
"not_open_creations":"not open creations"
|
||||
"not_open_creations": "No open creations",
|
||||
"open_creations": "Open creations"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user