-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
48 lines (43 loc) · 1.66 KB
/
webpack.dev.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
36
37
38
39
40
41
42
43
44
45
46
47
48
var webpack = require('webpack');
var path = require('path');
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var HistoryApiFallback = require('connect-history-api-fallback');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var ServerSetting = require('./setting/server.json');
var BUILD_DIR = path.resolve(__dirname, './dist');
var SEVER_DIR = path.resolve(__dirname, './server');
var CLIENT_DIR = path.resolve(__dirname, './client');
var SETTING_DIR = path.resolve(__dirname, './setting');
var MODULES_DIR = path.resolve(__dirname, './node_modules');
var configs = require('./webpack.config');
var config = {
entry: {
client: path.join(CLIENT_DIR, './client.js'),
vendor: configs.vendorList
},
output: {
path: path.join(BUILD_DIR, "./js/"),
filename: '[name]-bundle.js',
},
plugins: configs.corePluginList.concat(configs.devPluginList),
devtool: 'eval',
resolve: {
// Absolute path that contains modules
root: __dirname,
// Directory names to be searched for modules
modulesDirectories: ['libraries', 'node_modules'],
extensions: ['', '.js', '.jsx'],
alias: {
'googletile' : path.join(__dirname, './node_modules/leaflet-plugins/layer/tile/Google.js'),
'leaflet-canvas-marker' : path.join(__dirname, './libraries/leaflet-canvas-marker.js'),
'iscroll' : path.join(__dirname, './libraries/iscroll-zoom.js'),
// 'chartjs' : path.join(__dirname, './libraries/Chart.Core.js'),
// 'createjs' : path.join(__dirname, './libraries/createjs.js')
}
},
module : {
loaders : configs.loaderList
}
};
module.exports = config;