Skip to content

t`` macro doesn't work when load and activate message #1933

@ws-rush

Description

@ws-rush

Describe the bug
All messages defined with t`` macro doesn't change when load new lang, until we reload page

To Reproduce

in this repo examples/vite-project-react-babel change like following

image

Expected behavior
you can see same line with t`` doesn't change but with is change, both are imported from @lingui/macro

  • jsLingui version >=4.1.2
  • Babel version 7.21.3
  • Macro support:
  • I'm using SWC with @lingui/swc-plugin
  • I'm using Babel with babel-macro-plugin
  • I'm not using macro
  • Your Babel config (e.g. .babelrc) or framework you use (Create React App, NextJs, Vite)
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import { lingui } from "@lingui/vite-plugin"

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    react({
      babel: {
        plugins: ["macros"],
      },
    }),

    lingui(),
  ],
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions