Last active
May 30, 2023 19:52
-
-
Save insin/7102278ced05f0a07b55263e93fee05b to your computer and use it in GitHub Desktop.
Checking size of importing all of React Router
This file contains hidden or 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
import React from 'react' | |
import {render} from 'react-dom' | |
import 'react-router' | |
let App = React.createClass({ | |
render() { | |
return <div> | |
<h1>Hello world!</h1> | |
</div> | |
} | |
}) | |
render(<App/>, document.querySelector('#app')) |
This file contains hidden or 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
{ | |
"scripts": { | |
"test": "react build app.js && source-map-explorer dist/app.js" | |
}, | |
"dependencies": { | |
"react": "^15.1.0", | |
"react-dom": "^15.1.0", | |
"react-router": "^2.4.1" | |
}, | |
"devDependencies": { | |
"nwb": "0.11.x", | |
"source-map-explorer": "^1.3.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment