]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - app/config/webpack/prod.js
1 const webpack
= require('webpack');
2 const webpackMerge
= require('webpack-merge');
3 const ExtractTextPlugin
= require('extract-text-webpack-plugin');
4 const ManifestPlugin
= require('webpack-manifest-plugin');
6 const commonConfig
= require('./common.js');
8 module
.exports = function () {
9 return webpackMerge(commonConfig(), {
11 filename: '[name].js',
13 devtool: 'source-map',
15 new webpack
.DefinePlugin({
17 'NODE_ENV': JSON
.stringify('production'),
20 new webpack
.optimize
.UglifyJsPlugin({
32 new ExtractTextPlugin('[name].css'),
34 fileName: 'manifest.json',
42 loader: 'eslint-loader',
43 exclude: /node_modules/,
47 exclude: /(node_modules)/,
49 loader: 'babel-loader',
57 use: ExtractTextPlugin
.extract({
58 fallback: 'style-loader',
69 minifyFontValues: true,
79 test: /\.(jpg|png|gif|svg|ico)$/,
80 include: /node_modules/,
82 loader: 'file-loader',
84 name: 'img/[name].[ext]',
89 test: /\.(jpg|png|gif|svg|ico)$/,
90 exclude: /node_modules/,
92 loader: 'file-loader',
94 context: 'app/Resources/static',
95 name: '[path][name].[ext]',
100 test: /\.(eot|ttf|woff|woff2)$/,
102 loader: 'file-loader',
104 name: 'fonts/[name].[ext]',