Created
June 7, 2017 12:38
-
-
Save f3yisayo/4a4feb89674525a38b76083bcac7377b 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 webpack = require('webpack'); | |
module.exports = { | |
entry: [ | |
'script-loader!jquery/dist/jquery.min.js', | |
'script-loader!foundation-sites/dist/js/foundation.min.js', | |
'./app/app.jsx' | |
], | |
externals: { | |
jquery: 'jQuery' | |
}, | |
plugins: [ | |
new webpack.ProvidePlugin({ | |
'$': 'jquery', | |
'jQuery': 'jquery' | |
}) | |
], | |
output: { | |
path: __dirname, | |
filename: './public/bundle.js' | |
}, | |
resolve: { | |
alias: { | |
Main: 'app/components/Main.jsx', | |
Nav: 'app/components/Nav.jsx', | |
Weather: 'app/components/Weather.jsx', | |
About: 'app/components/About.jsx', | |
Examples: 'app/components/Examples.jsx', | |
WeatherForm: 'app/components/WeatherForm.jsx', | |
WeatherMessage: 'app/components/WeatherMessage.jsx', | |
openWeatherMap: 'app/api/openWeatherMap.jsx', | |
ErrorModal: 'app/components/ErrorModal.jsx', | |
applicationStyles: 'app/styles/app.scss' | |
}, | |
extensions: ['.js', '.jsx'] | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.scss$/, | |
use: [{loader: 'sass-loader'}] | |
}, | |
{ | |
loader: 'babel-loader', | |
query: { | |
presets: ['react', 'es2015', 'stage-0'] | |
}, | |
test: /\.jsx?$/, | |
exclude: /(node_modules|bower_components)/ | |
} | |
] | |
}, | |
devtool: 'cheap-module-eval-source-map' | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment