Skip to content

Instantly share code, notes, and snippets.

@couto
Created November 25, 2015 23:10
Show Gist options
  • Save couto/8defa0595ccff73737f6 to your computer and use it in GitHub Desktop.
Save couto/8defa0595ccff73737f6 to your computer and use it in GitHub Desktop.
{
"name": "tmp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack --config webpack.conf.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.2.1",
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.1.18",
"babel-preset-react": "^6.1.18",
"webpack": "^1.12.9"
},
"dependencies": {
"react": "^0.14.3",
"react-dom": "^0.14.3"
}
}
var path = require("path");
var build = path.resolve(__dirname, 'build/');
module.exports = {
entry: path.join(__dirname, '/src/app.jsx'),
resolve: {
extensions: ["", ".js", ".jsx", ".txt"],
},
output: {
path: build,
filename: "app.js"
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
include: path.join(__dirname, '/src/'),
loader: 'babel?presets[]=react,presets[]=es2015'
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment