forked from tommytroylin/CommunityHealthMonitoringSystem
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.dist.config.js
35 lines (34 loc) · 1.77 KB
/
webpack.dist.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
35
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: [path.resolve(__dirname, 'app/main.js')]},
output: {
path: path.resolve(__dirname, 'dist'),
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'},
{from: 'build/index.html', to: 'index.html'}
])
]
};