forked from tommytroylin/CommunityHealthMonitoringSystem
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
34 lines (33 loc) · 1.74 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
34
var path = require('path');
var Webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {app: ['webpack/hot/dev-server', path.resolve(__dirname, 'app/main.js')]},
output: {
path: path.resolve(__dirname, 'build'),
filename: '[name].js'
},
module: {
loaders: [
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', query: {presets: ['es2015', 'react']}},
{test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader')},
{test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/font-woff'},
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream'},
{test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file'},
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml'},
{test: /\.png$/, loader: 'url?limit=10000&mimetype=image/png'},
{test: /\.jpg$/, loader: 'url?limit=10000&mimetype=image/jpeg'}
]
},
plugins: [
new ExtractTextPlugin('[name].css', {}),
new CopyWebpackPlugin([
{from: 'node_modules/jquery/dist/jquery.min.js', to: 'lib/jquery.min.js'},
{from: 'node_modules/highcharts-release/highcharts.js', to: 'lib/highcharts.js'},
{from: 'node_modules/highcharts-release/highcharts-more.js', to: 'lib/highcharts-more.js'},
{from: 'node_modules/highmaps-release/modules/map.js', to: 'lib/map.js'},
{from: 'node_modules/jquery-knob/dist/jquery.knob.min.js', to: 'lib/jquery.knob.min.js'},
])
]
};