1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-16 11:37:13 +02:00
pigallery2/frontend/webpack.config.js

44 lines
1.1 KiB
JavaScript
Raw Normal View History

2016-03-12 19:11:19 +02:00
var webpack = require('webpack');
var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin");
2016-05-05 18:19:45 +02:00
var path = require("path");
2016-03-12 19:11:19 +02:00
module.exports = {
entry: {
2016-05-05 18:19:45 +02:00
'app': path.join(__dirname,'/main.ts')
2016-03-12 19:11:19 +02:00
},
output: {
2016-05-05 18:19:45 +02:00
filename: path.join(__dirname,'/dist/[name]-bundle.js'),
2016-03-12 19:11:19 +02:00
library: ['peer']
},
// Turn on sourcemaps
2016-04-27 22:37:07 +02:00
//devtool: 'source-map',
2016-03-12 19:11:19 +02:00
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
modulesDirectories: [
'node_modules',
'lib'
]
},
// Add minification
plugins: [
],
module: {
loaders: [
// Support for .ts files.
{ test: /\.ts$/, loader: 'ts-loader', exclude: [ /\.(spec|e2e)\.ts$/ ] },
// Support for *.json files.
{ test: /\.json$/, loader: 'json-loader' },
// Support for CSS as raw text
{ test: /\.css$/, loader: 'raw-loader' },
// support for .html as raw text
{ test: /\.html$/, loader: 'raw-loader', exclude: [ 'index.html' ] }
]
}
};