Created
January 18, 2017 01:02
-
-
Save josemunozr/61291028a45cae5531cbbc2ea08c83fa to your computer and use it in GitHub Desktop.
Example configuration webpack with loaders [babel{es2015, react}]
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
module.exports ={ | |
resolve: { | |
extensions: ['', '.js','.jsx'] | |
}, | |
context: __dirname, | |
entry: { | |
app: ['./src/app.jsx'] | |
}, | |
output: { | |
path: './build', | |
filename: 'app.js', | |
publicPath: '/build/' | |
}, | |
devServer:{ | |
host: '0.0.0.0', | |
port: 8080, | |
inline: true | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /(\.jsx?)$/, | |
loader: 'babel-loader', | |
query: { | |
presets: ['es2015','react'] | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment