Created
September 19, 2017 17:40
-
-
Save anonymous/50f9fe0c50ef57e96f5b5542cedb980a to your computer and use it in GitHub Desktop.
My error
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 { render } from "react-dom"; | |
class App extends React.Component { | |
render() { | |
return { | |
<div> | |
<h1>Hello!</h1> | |
</div> | |
}; | |
} | |
} | |
render(<App/>, window.document.getElementById('app')); |
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": "bliimo-test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "npm run build", | |
"build": "webpack -d && copy src\\index.html dist\\index.html && webpack-dev-server --content-base src\\ --inline --hot", | |
"build:prod": "webpack -p && copy src/index.html dist/index.html" | |
}, | |
"author": "Jeff Ramirez", | |
"license": "ISC", | |
"dependencies": { | |
"react": "^15.6.1", | |
"react-dom": "^15.6.1" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.26.0", | |
"babel-loader": "^7.1.2", | |
"babel-preset-env": "^1.6.0", | |
"babel-preset-es2015": "^6.24.1", | |
"babel-preset-react": "^6.24.1", | |
"babel-preset-stage-2": "^6.24.1", | |
"webpack": "^3.6.0", | |
"webpack-dev-server": "^2.8.2" | |
} | |
} |
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
var webpack = require("webpack"); | |
var path = require("path"); | |
var DIST_DIR = path.resolve(__dirname, "dist"); | |
var SRC_DIR = path.resolve(__dirname, "src"); | |
var config = { | |
entry: SRC_DIR + "/app/index.js", | |
output: { | |
path: DIST_DIR + "/app", | |
filename: "bundle.js", | |
publicPath: "/app" | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js?/, | |
include: SRC_DIR, | |
loader: "babel-loader", | |
query: { | |
presets: ["react", "env"] | |
} | |
} | |
] | |
} | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment