Skip to content

Instantly share code, notes, and snippets.

@mmfilesi
Created October 4, 2016 08:42
Show Gist options
  • Save mmfilesi/b4d8515627cbbf3be9aa7c89a93b361f to your computer and use it in GitHub Desktop.
Save mmfilesi/b4d8515627cbbf3be9aa7c89a93b361f to your computer and use it in GitHub Desktop.
react, webpack configuration
{
"presets": ["es2015", "stage-1", "react"]
}
{
"name": "my-app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"serve": "webpack-dev-server --devtool sourcemap --progress --colors --content-base dist/ --inline",
"open": "opener http://localhost:8080",
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run open && npm run serve"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.17.0",
"babel-loader": "^6.2.5",
"babel-preset-es2015": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-1": "^6.16.0",
"babel-preset-stage-3": "^6.17.0",
"opener": "^1.4.2",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.16.1"
},
"dependencies": {
"babel-preset-es2015": "^6.16.0",
"react": "^15.3.2",
"react-dom": "^15.3.2"
}
}
var path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist")
},
module: {
loaders: [
{
test: /\.js$/,
loader: "babel"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment