-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix for IE 11-compatible Babel transpilation #242
Conversation
{ | ||
"preset-env": { | ||
"useBuiltIns": "entry", | ||
"corejs": 3, |
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.
Newer than the default. Default would be 2, also this line is necessary to get rid of a warning.
}, | ||
"transform-runtime": { | ||
"corejs": 3, | ||
"useESModules": false |
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.
Without this, the server code would crash on start.
"babel-plugin-styled-components" | ||
], | ||
"env": { | ||
"ttag": { |
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.
This is the configuration used when running Babel with BABEL_ENV=ttag
.
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.
did you test the pot file extraction with these changes?
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.
I didn't look in detail at the .pot
file, but it was generated correctly.
"pull-translations": "tx pull -af", | ||
"retranslate": "npm run build && npm run pull-translations && NEW_SOURCE_PO='./src/static/i18n/en_US.txt' retranslate/run.sh", |
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.
static
is deprecated
"> 1%" | ||
"> 0.25%", | ||
"not dead" |
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.
Support a few more browsers because why not :)
@@ -313,72 +313,70 @@ export default class App extends BaseApp { | |||
}; | |||
|
|||
return ( | |||
<Container> |
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.
Next.js 9 doesn't need this component wrapper anymore. Everything below this line in this file is just Prettier's re-indentation, feel free to ignore :)
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.
LGTM
"babel-plugin-styled-components" | ||
], | ||
"env": { | ||
"ttag": { |
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.
did you test the pot file extraction with these changes?
This cleans up browserslist /
babel/preset-env
configuration and fixes IE11 by movingbabel-plugin-ttag
out of the way when Next.js / Webpack / Babel transpiles our code.Here is a more detailed description of the issue: ttag-org/babel-plugin-ttag#138
For fun, it includes little changes to remove deprecation warnings in Next 9.