Skip to content

Commit

Permalink
fix vue-i18n in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
cars10 committed Jun 27, 2023
1 parent a8dc8a2 commit 4f2542c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY yarn.lock .

RUN yarn install --ignore-optional
COPY . .
RUN yarn build -l silent
RUN yarn build

FROM nginx:mainline-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile_multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY yarn.lock .

RUN yarn install --ignore-optional
COPY . .
RUN yarn build -l silent
RUN yarn build

FROM nginx:mainline-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_browser_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PACKAGE_VERSION=$(cat package.json \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')

yarn build -l silent
yarn build

rm -rf artifacts/*.zip

Expand Down
7 changes: 6 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { quasar, transformAssetUrls } from '@quasar/vite-plugin'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { resolve, dirname } from 'node:path'
import { fileURLToPath } from 'url'

function removeDataTestid (node) {
if (node.type === 1 /* NodeTypes.ELEMENT */) {
Expand All @@ -22,7 +24,10 @@ export default defineConfig({
}
}),
quasar(),
VueI18nPlugin()
VueI18nPlugin({
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/**'),
strictMessage: false
})
],
build: {
sourcemap: true
Expand Down

0 comments on commit 4f2542c

Please sign in to comment.