forked from verdnatura/hedera-web
56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
|
|
var webpack = require ('webpack');
|
|
var path = require ('path');
|
|
|
|
var devMode = true;
|
|
|
|
module.exports =
|
|
{
|
|
entry: ['./app.js'],
|
|
output: {
|
|
path: path.join (__dirname, 'build'),
|
|
filename: 'hedera-web.js',
|
|
chunkFilename: 'chunk.[id].js',
|
|
publicPath: devMode ? 'http://localhost:8080/build/' : 'build/',
|
|
},
|
|
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: [
|
|
/* new webpack.IgnorePlugin (new RegExp ('.{2}/(forms|pages|rest)'))
|
|
new webpack.optimize.UglifyJsPlugin ({minimize: true})
|
|
*/ ]
|
|
};
|
|
/*
|
|
var fs = require ('fs');
|
|
|
|
var configs = [];
|
|
var langs = fs.readdirSync ('./locale');
|
|
|
|
for (var lang in languages)
|
|
configs.push (
|
|
{
|
|
entry: './locale.js',
|
|
output: {
|
|
path: __dirname +'/build',
|
|
filename: 'lang.'+ lang +'.js'
|
|
},
|
|
module: {
|
|
loaders: [
|
|
{ test: /\.json$/, loader: 'json' }
|
|
]
|
|
}
|
|
});
|
|
*/
|