Last active
May 2, 2019 19:48
-
-
Save midnightcodr/fbcfc63ab80951b3f13b330b0ec1f406 to your computer and use it in GitHub Desktop.
parcel bundler for a simple project with rebass/styled-components
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
Show hidden characters
{ | |
"presets": [ | |
"env", | |
"react" | |
], | |
"plugins": [ | |
"transform-object-rest-spread", | |
"transform-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
import React from 'react' | |
import {Box} from 'rebass' | |
export default () => ( | |
<Box bg='red'> | |
Hello React! | |
</Box> | |
) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script src="./index.js"></script> | |
</body> | |
</html> |
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
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import App from './App' | |
ReactDOM.render( | |
<App />, | |
document.getElementById('root') | |
) |
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
{ | |
"name": "test3", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"scripts": { | |
"start": "parcel ./index.html", | |
"build": "parcel build ./index.html --experimental-scope-hoisting" | |
}, | |
"dependencies": { | |
"json5": "^2.1.0", | |
"react": "^16.8.6", | |
"react-dom": "^16.8.6", | |
"rebass": "^3.1.0", | |
"styled-components": "^4.2.0" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.26.3", | |
"babel-plugin-transform-class-properties": "^6.24.1", | |
"babel-plugin-transform-object-rest-spread": "^6.26.0", | |
"babel-preset-env": "^1.7.0", | |
"babel-preset-react": "^6.24.1", | |
"parcel-bundler": "^1.12.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment