fix webpack config formatting

This commit is contained in:
Denys Vuika 2016-12-16 12:18:32 +00:00
parent 882b19930e
commit 12b361acc8

View File

@ -47,14 +47,14 @@ module.exports = {
}, },
module: { module: {
preLoaders: [ preLoaders: [
{ {
test: /\.js$/, test: /\.js$/,
include: [ include: [
...alfrescoLibs ...alfrescoLibs
], ],
loader: 'source-map-loader' loader: 'source-map-loader'
} }
], ],
loaders: [ loaders: [
{ {
test: /\.ts$/, test: /\.ts$/,
@ -65,68 +65,66 @@ module.exports = {
test: /\.js$/, test: /\.js$/,
include: [ include: [
...alfrescoLibs ...alfrescoLibs
], ],
loaders: ['angular2-template-loader', 'source-map-loader', 'systemjs-loader'] loaders: ['angular2-template-loader', 'source-map-loader', 'systemjs-loader']
},
{
test: /\.html$/,
exclude: alfrescoLibs,
loader: 'html'
},
{
test: /\.html$/,
include: alfrescoLibs,
loader: 'html',
query: {
interpolate: true
}
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file?name=assets/[name].[hash].[ext]'
},
{
test: /\.css$/,
exclude: [
helpers.root('app'),
...alfrescoLibs
],
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
test: /\.css$/,
include: [
helpers.root('app'),
...alfrescoLibs
],
loader: 'raw'
}
]
}, },
{
test: /\.html$/,
exclude: alfrescoLibs,
loader: 'html'
},
{
test: /\.html$/,
include: alfrescoLibs,
loader: 'html',
query: {
interpolate: true
}
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file?name=assets/[name].[hash].[ext]'
},
{
test: /\.css$/,
exclude: [
helpers.root('app'),
...alfrescoLibs
],
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
test: /\.css$/,
include: [
helpers.root('app'),
...alfrescoLibs
],
loader: 'raw'
}
]
},
plugins: [ plugins: [
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
'dialogPolyfill': 'dialog-polyfill/dialog-polyfill' 'dialogPolyfill': 'dialog-polyfill/dialog-polyfill'
}), }),
new CopyWebpackPlugin([
{
from: 'versions.json'
}
]),
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({ new CopyWebpackPlugin([
template: 'index.html' { from: 'versions.json' }
}) ]),
],
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
template: 'index.html'
})
],
node: { node: {
fs: 'empty', fs: 'empty',
module: false module: false
} }
}; };