Skip to content

Commit

Permalink
fix(vite): externalize macro imports (#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
timofei-iatsenko authored Feb 24, 2023
1 parent 15510c1 commit 1719430
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vite-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export function lingui(linguiConfig: LinguiConfigOpts = {}): Plugin {
return {
name: "vite-plugin-lingui",

config: (config) => {
// https://github.com/lingui/js-lingui/issues/1464
config.optimizeDeps.exclude = config.optimizeDeps.exclude || []
config.optimizeDeps.exclude.push("@lingui/macro")
},

transform(src, id) {
if (fileRegex.test(id)) {
const catalogRelativePath = path.relative(config.rootDir, id)
Expand Down

1 comment on commit 1719430

@vercel
Copy link

@vercel vercel bot commented on 1719430 Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.