forked from cofacts/rumors-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.babelrc.js
26 lines (25 loc) · 800 Bytes
/
.babelrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require('dotenv').config();
module.exports = {
"presets": ["next/babel"],
"plugins": [
[
"module-resolver",
// https://github.com/tleunen/babel-plugin-module-resolver#getting-started
{
"root": ["./"],
"alias": {
"components": "./components",
"constants": "./constants",
"pages": "./pages",
"lib": "./lib",
"typegen": "./typegen",
}
}
],
"@babel/plugin-proposal-class-properties", // ttag extraction & resolve needs it, even though it's included in next/babel...
"@babel/plugin-proposal-optional-chaining",
[ // Need to be put last so that it can replace all strings
'ttag', {resolve: {translations: `i18n/${process.env.LOCALE || 'en_US'}.po`}, dedent: true,}
],
]
}