Skip to content

__VUE_PROD_DEVTOOLS__ issue on build with vite with 9.4.1 #1569

Closed
@hschaefer123

Description

@hschaefer123

Reporting a bug?

Hi,
i am currently using vitepress 1.0.0-rc.20 and also vue-i18n 9.4.1 (updated from 9.3.0).

Now the build process fails with error
VUE_PROD_DEVTOOLS is not defined!
inside vue-i18n.

Workaround:
I was able to get it running while removing the check form by changing to lines
(... env != "production" || VUE_PROD_DEVTOOLS
by removing the second var, but it would be great to get that fixed.

Without that var, vitepress/vite ssr build works as expected.

Regards
Holger

Expected behavior

No build errors using vite

Reproduction

Using vitepress inside custom theme index.ts

import { createI18n } from "vue-i18n";
const i18n = createI18n({
locale: "de-DE", // set locale
fallbackLocale: "en-US", // set fallback locale
numberFormats,
});
ctx.app.use(i18n);

System Info

System:
    OS: macOS 13.6
    CPU: (12) arm64 Apple M2 Max
    Memory: 2.95 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.1 - /opt/homebrew/opt/node@18/bin/node
    npm: 9.6.7 - /opt/homebrew/opt/node@18/bin/npm
    pnpm: 8.6.12 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 117.0.5938.92
    Safari: 16.6
  npmPackages:
    vitepress: ^1.0.0-rc.20 => 1.0.0-rc.20 
    vue: ^3.3.4 => 3.3.4 
    vue-i18n: ^9.4.1 => 9.4.1 
    vue-inline-svg: ^3.1.2 => 3.1.2 
    vue3-markdown-it: ^1.0.10 => 1.0.10

Screenshot

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugBug or Bug fixes🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions