Last active
March 4, 2017 03:51
-
-
Save yeti-detective/536a637c6f44e02d57344adb526709fa to your computer and use it in GitHub Desktop.
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 path = require('path'); // You know what path is for | |
var webpack = require('webpack'); // obviously it needs webpack | |
module.exports = { | |
/* | |
the entry key defines the file that will be the entry point. In our case, index.jsx | |
*/ | |
entry: path.join(__dirname + '/index.jsx'), | |
/* | |
the output key names the file and location of the transpiled javascript | |
*/ | |
output: { path: path.join(__dirname), filename: 'bundle.js' }, | |
module: { | |
/* | |
loaders tells webpack what kind of files we are loading. In our case .jsx | |
*/ | |
loaders: [ | |
{ | |
test: /\.jsx?$/, | |
loader: 'babel-loader', | |
exclude: /node_modules/, | |
query: { | |
presets: ['es2015', 'react'] | |
} | |
} | |
] | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment