This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from FormidableLabs/task/upgrade-webpack-babel…
…-react Upgrade webpack, Babel, and React. Add TypeScript support.
- Loading branch information
Showing
16 changed files
with
9,160 additions
and
6,913 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"react", | ||
"stage-0" | ||
"@babel/preset-typescript", | ||
["@babel/preset-env", { "modules": false }], | ||
["@babel/preset-react", { "runtime": "automatic" }] | ||
], | ||
"plugins": [ | ||
"transform-flow-strip-types", | ||
"transform-decorators-legacy" | ||
"@babel/plugin-transform-flow-strip-types", | ||
["@babel/plugin-proposal-decorators", { "version": "legacy" }], | ||
["@babel/plugin-proposal-class-properties"] | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} |
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,23 +1,6 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import ReactDOM from 'react-dom/client'; | ||
import Presentation from './presentation'; | ||
import { AppContainer } from 'react-hot-loader'; | ||
|
||
ReactDOM.render( | ||
<AppContainer> | ||
<Presentation /> | ||
</AppContainer>, | ||
document.getElementById('root') | ||
); | ||
|
||
if (process.env.NODE_ENV !== 'production') { | ||
module.hot.accept('./presentation', () => { | ||
const NextPresentation = require('./presentation').default; | ||
ReactDOM.render( | ||
<AppContainer> | ||
<NextPresentation /> | ||
</AppContainer>, | ||
document.getElementById('root') | ||
); | ||
}); | ||
} | ||
const root = ReactDOM.createRoot(document.getElementById('root')); | ||
root.render(<Presentation />); |
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
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
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
Oops, something went wrong.