-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: First argument must be tagged template expression. You should use 'msgid' tag #122
Comments
I figured out a minimal reproducible case:
|
Thanks @anilanar! Will try to investigate ASAP. |
Sorry for the late investigation. But finally this issue was fixed in |
Keep in mind, while building for production always set |
@AlexMost That's a big problem for us, because we don't use |
@anilanar ah, if you are using this plugin only for translations extraction - you can just exclude ttag plugin for the production build. Have you tried Or, you can also stay with |
Sadly it’s not that simple. It’s a monorepo with shared dependencies and multiple projects having their own webpack builds so each project (and its deps) needs its own translations extracted. Therefore using a babel plugin is the easiest way of doing it. Otherwise I’d have to make webpack report all files that was part of a build and feed them into ttag-cli, which won’t be able to handle modules that were tree shaken or omitted from the build due to NODE_ENV flags etc. |
@AlexMost Appreciate it. Added it to the current sprint, will let you know. |
Reproduce
yarn
npm start
Expected
File being compiled and served in HTTP server, no error found
Actual
Shows error during compile:
Affected versions
babel-plugin-ttag
1.4.1
~1.7.3
babel-plugin-ttag
1.4.0
is the last good version.Note
Seems like a regression issue. Previous fix: #81 .
The text was updated successfully, but these errors were encountered: