0
1
Fork 0
hedera-web-mindshore/webpack.config.js

39 lines
883 B
JavaScript
Raw Normal View History

2016-09-24 14:32:31 +00:00
var webpack = require ('webpack');
2016-09-27 19:31:46 +00:00
var path = require ('path');
2016-10-04 15:27:49 +00:00
var SplitPlugin = require ('./split-plugin');
2016-09-27 19:31:46 +00:00
var devMode = true;
2016-09-24 14:32:31 +00:00
module.exports =
{
2016-10-04 15:27:49 +00:00
entry: ['./app.js'],
output: {
2016-09-27 19:31:46 +00:00
path: path.join (__dirname, 'build'),
filename: 'hedera-web.js',
chunkFilename: 'chunk.[id].js',
publicPath: devMode ? 'http://localhost:8080/build/' : 'build/',
2016-10-04 15:27:49 +00:00
},
module: {
2016-09-26 09:28:47 +00:00
loaders: [
{ test: /\.css$/, loader: 'style!css' },
{ test: /\.json$/, loader: 'json' },
{ test: /\.xml$/, loader: 'raw' }
]
2016-10-04 15:27:49 +00:00
},
resolve: {
2016-09-26 09:28:47 +00:00
modulesDirectories: [__dirname +'/js', __dirname, 'node_modules'],
fallback: process.env.NODE_PATH,
2016-10-04 15:27:49 +00:00
},
resolveLoader: {
2016-09-26 09:28:47 +00:00
fallback: process.env.NODE_PATH
2016-10-04 15:27:49 +00:00
},
2016-09-26 09:28:47 +00:00
plugins: [
2016-10-04 15:27:49 +00:00
new SplitPlugin (),
/* new webpack.IgnorePlugin (new RegExp ('/.{2}/(forms|pages|rest)'))
2016-09-27 06:18:20 +00:00
new webpack.optimize.UglifyJsPlugin ({minimize: true})
2016-10-11 07:26:10 +00:00
*/ ],
devtool: 'source-map'
2016-09-24 14:32:31 +00:00
};
2016-09-27 19:31:46 +00:00