-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (32 loc) · 1.06 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './public/js/main.js',
output: { path: __dirname + '/public/js/bundle', filename: 'bundle.js' },
resolve: {
root: __dirname,
alias: {
Main: 'public/components/Main.jsx',
Nav: 'public/components/Nav.jsx',
Weather: 'public/components/Weather.jsx',
About: 'public/components/About.jsx',
Examples: 'public/components/Examples.jsx',
Forecast: 'public/components/Forecast.jsx',
ForecastMessage: 'public/components/ForecastMessage.jsx',
WeatherForm: 'public/components/WeatherForm.jsx',
WeatherMessage: 'public/components/WeatherMessage.jsx',
WeatherApi: 'public/api/WeatherApi.jsx'
},
extensions: ['' , '.js' , 'jsx']
},
module: {
loaders: [{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
}]
}
};