const rootDir = path.resolve(__dirname, '../../../');
-module.exports = function() {
+module.exports = function () {
return {
entry: {
material: path.join(rootDir, './app/Resources/static/themes/material/index.js'),
baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'),
},
-
output: {
filename: '[name].js',
path: path.resolve(rootDir, 'web/bundles/wallabagcore'),
$: 'jquery',
jQuery: 'jquery',
'window.$': 'jquery',
- 'window.jQuery': 'jquery'
+ 'window.jQuery': 'jquery',
}),
new StyleLintPlugin({
configFile: '.stylelintrc',
],
resolve: {
alias: {
- jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js')
- }
+ jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js'),
+ },
},
};
};
const webpackMerge = require('webpack-merge');
const webpack = require('webpack');
-const path = require('path');
const commonConfig = require('./common.js');
module.exports = function () {
return webpackMerge(commonConfig(), {
devtool: 'eval-source-map',
output: {
- filename: '[name].dev.js'
+ filename: '[name].dev.js',
},
devServer: {
use: {
loader: 'babel-loader',
options: {
- presets: ['env']
- }
- }
+ presets: ['env'],
+ },
+ },
},
{
test: /\.(s)?css$/,
loader: 'css-loader',
options: {
importLoaders: 1,
- }
+ },
},
- 'postcss-loader',
- 'sass-loader'
- ]
+ 'postcss-loader',
+ 'sass-loader',
+ ],
},
{
test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/,
- use: 'url-loader'
+ use: 'url-loader',
},
- ]
+ ],
},
- })
+ });
};
const commonConfig = require('./common.js');
-module.exports = function() {
+module.exports = function () {
return webpackMerge(commonConfig(), {
output: {
- filename: '[name].js'
+ filename: '[name].js',
},
devtool: 'source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': {
- 'NODE_ENV': JSON.stringify('production')
- }
+ 'NODE_ENV': JSON.stringify('production'),
+ },
}),
new webpack.optimize.UglifyJsPlugin({
beautify: false,
mangle: {
screw_ie8: true,
- keep_fnames: true
+ keep_fnames: true,
},
compress: {
screw_ie8: true,
- warnings: false
+ warnings: false,
},
- comments: false
+ comments: false,
}),
new ExtractTextPlugin('[name].css'),
new ManifestPlugin({
fileName: 'manifest.json',
- })
+ }),
],
module: {
rules: [
use: {
loader: 'babel-loader',
options: {
- presets: ['env']
- }
- }
+ presets: ['env'],
+ },
+ },
},
{
test: /\.(s)?css$/,
importLoaders: 1,
minimize: {
discardComments: {
- removeAll: true
+ removeAll: true,
},
core: true,
- minifyFontValues: true
- }
- }
+ minifyFontValues: true,
+ },
+ },
},
'postcss-loader',
- 'sass-loader'
- ]
- })
+ 'sass-loader',
+ ],
+ }),
},
{
test: /\.(jpg|png|gif|svg)$/,
loader: 'file-loader',
options: {
name: 'img/[name].[ext]',
- }
- }
+ },
+ },
},
{
test: /\.(eot|ttf|woff|woff2)$/,
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]',
- }
- }
- }
- ]
+ },
+ },
+ },
+ ],
},
- })
+ });
};