-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vite-plugin): report user-friendly error when macro used without…
… transformation (#1720)
- Loading branch information
1 parent
dc82882
commit 53f6a7c
Showing
13 changed files
with
444 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"locales": ["en"], | ||
"catalogs": [{ | ||
"path": "<rootDir>/locale/{locale}" | ||
}], | ||
"fallbackLocales": { | ||
"default": "en" | ||
}, | ||
"format": "po" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { t } from "@lingui/macro" | ||
|
||
export async function load() { | ||
return t`Ola` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
msgid "Hello World" | ||
msgstr "Hello World" | ||
|
||
msgid "My name is {name}" | ||
msgstr "My name is {name}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createDefaultViteConfig } from "../default-vite.config" | ||
import { UserConfig } from "vite" | ||
import macrosPlugin from "vite-plugin-babel-macros" | ||
|
||
const config: UserConfig = { | ||
...createDefaultViteConfig(__dirname), | ||
} | ||
|
||
config.plugins.push(macrosPlugin()) | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"locales": ["en"], | ||
"catalogs": [{ | ||
"path": "<rootDir>/locale/{locale}" | ||
}], | ||
"fallbackLocales": { | ||
"default": "en" | ||
}, | ||
"format": "po" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { t } from "@lingui/macro" | ||
|
||
export async function load() { | ||
return t`Ola` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
msgid "Hello World" | ||
msgstr "Hello World" | ||
|
||
msgid "My name is {name}" | ||
msgstr "My name is {name}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { createDefaultViteConfig } from "../default-vite.config" | ||
|
||
export default createDefaultViteConfig(__dirname) |
Oops, something went wrong.
53f6a7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
js-lingui – ./
js-lingui-git-main-lingui.vercel.app
js-lingui.vercel.app
js-lingui-lingui.vercel.app
lingui.js.org
lingui.dev