@lingui/macro doesn't work with native ES modules #1741
Answered
by
timofei-iatsenko
fraction01
asked this question in
Q&A
-
Hi, When I Try to use import express from 'express';
import { t } from "@lingui/macro";
const router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
const hello = t`Hello World!`;
res.render('index', { title: 'Express', hello });
});
export default router; To Reproduce
Expected behavior Additional context
How can I get it work with native ES modules ? Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
timofei-iatsenko
Aug 5, 2023
Replies: 1 comment 2 replies
-
I didn't start your reproduction repo, but I bet the babel-macro-plugin just not configured correctly. Or babel not processing this exact file. So the problem not in the es modules but in your configuration. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've just checked your example. You don't have babel preprocess step anywhere... You just run your js files directly without babel.