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

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