salix/webpack.config.js

49 lines
1.1 KiB
JavaScript

// var webpack = require('webpack');
var path = require('path');
module.exports =
{
entry: {
'salix.app': ['@salix/app'],
'salix.login': ['@salix/login']
},
output: {
path: path.join(__dirname, 'build', 'public'),
filename: '[name].js',
publicPath: 'build/public/',
chunkFilename: "[name].js"
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
},{
test: /\.html$/,
loader: 'raw'
},{
test: /\.json$/,
loader: 'json'
},{
test: /\.css$/,
loader: 'style!css'
},{
test: /\.scss$/,
loader: 'style!css!sass'
}
]
},
resolve: {
modulesDirectories: [
__dirname,
'node_modules'
]
},
devtool: 'cheap-module-eval-source-map' // 'source-map'
};