-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: upgrade Next.js and React versions
- Loading branch information
Showing
8 changed files
with
40 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
const plugins = []; | ||
if (process.env.NODE_ENV === 'test') { | ||
// Enable async/await for jest | ||
plugins.push('@babel/plugin-transform-runtime'); | ||
} | ||
|
||
module.exports = { | ||
extends: '@trendmicro/babel-config', | ||
plugins: [ | ||
...plugins, | ||
'@emotion/babel-plugin', | ||
], | ||
presets: [ | ||
'@babel/preset-env', | ||
['@babel/preset-react', { | ||
/** | ||
* Decides which runtime to use. | ||
* - 'automatic' auto imports the functions that JSX transpiles to. | ||
* - 'classic' does not automatic import anything. | ||
*/ | ||
'runtime': 'classic', // defaults to classic | ||
//'runtime': 'automatic', // for React 16.14.0, React 17 and higher that supports the new transform | ||
}], | ||
'@emotion/babel-preset-css-prop', | ||
], | ||
plugins: [ | ||
'@babel/plugin-transform-runtime', | ||
'@babel/preset-react' | ||
], | ||
}; |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,20 @@ | ||
const plugins = []; | ||
if (process.env.NODE_ENV === 'test') { | ||
// Enable async/await for jest | ||
plugins.push('@babel/plugin-transform-runtime'); | ||
} | ||
|
||
module.exports = { | ||
extends: '@trendmicro/babel-config', | ||
plugins: [ | ||
...plugins, | ||
'@emotion/babel-plugin', | ||
], | ||
presets: [ | ||
'@babel/preset-env', | ||
['@babel/preset-react', { | ||
/** | ||
* Decides which runtime to use. | ||
* - 'automatic' auto imports the functions that JSX transpiles to. | ||
* - 'classic' does not automatic import anything. | ||
*/ | ||
'runtime': 'classic', // defaults to classic | ||
//'runtime': 'automatic', // for React 16.14.0, React 17 and higher that supports the new transform | ||
'runtime': 'automatic', | ||
'importSource': '@emotion/react', | ||
}], | ||
'@emotion/babel-preset-css-prop', | ||
], | ||
}; |
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