hedera-web/webpack.config.js

56 lines
1.1 KiB
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');
var devMode = true;
2016-09-24 14:32:31 +00:00
module.exports =
{
2016-09-27 19:31:46 +00:00
entry: ['./app.js'],
2016-09-24 14:32:31 +00:00
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-09-26 09:28:47 +00:00
},
module: {
loaders: [
{ test: /\.css$/, loader: 'style!css' },
{ test: /\.json$/, loader: 'json' },
{ test: /\.xml$/, loader: 'raw' }
]
},
resolve: {
modulesDirectories: [__dirname +'/js', __dirname, 'node_modules'],
fallback: process.env.NODE_PATH,
},
resolveLoader: {
fallback: process.env.NODE_PATH
},
plugins: [
2016-09-27 06:18:20 +00:00
/* new webpack.IgnorePlugin (new RegExp ('.{2}/(forms|pages|rest)'))
new webpack.optimize.UglifyJsPlugin ({minimize: true})
*/ ]
2016-09-24 14:32:31 +00:00
};
2016-09-27 06:18:20 +00:00
/*
2016-09-27 19:31:46 +00:00
var fs = require ('fs');
2016-09-27 06:18:20 +00:00
var configs = [];
var langs = fs.readdirSync ('./locale');
2016-09-24 14:32:31 +00:00
2016-09-27 06:18:20 +00:00
for (var lang in languages)
configs.push (
{
entry: './locale.js',
output: {
path: __dirname +'/build',
filename: 'lang.'+ lang +'.js'
},
module: {
loaders: [
{ test: /\.json$/, loader: 'json' }
]
}
});
*/