Created
November 25, 2015 23:10
-
-
Save couto/8defa0595ccff73737f6 to your computer and use it in GitHub Desktop.
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
{ | |
"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" | |
} | |
} |
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
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