1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-09 09:51:02 +01:00
bitwarden-browser/webpack.prod.js

42 lines
1.1 KiB
JavaScript
Raw Normal View History

const merge = require('webpack-merge');
2017-10-29 03:47:01 +01:00
const ExtractTextPlugin = require('extract-text-webpack-plugin');
2017-11-09 20:28:18 +01:00
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const common = require('./webpack.common.js');
const webpack = require('webpack');
const extractLess = new ExtractTextPlugin({
2017-11-09 20:29:09 +01:00
filename: '[name].css',
disable: false,
allChunks: true
});
module.exports = merge(common, {
module: {
rules: [
{
test: /\.less$/,
use: extractLess.extract({
use: [
{
2017-10-29 03:47:01 +01:00
loader: 'css-loader',
},
{
2017-10-29 03:47:01 +01:00
loader: 'less-loader',
}
]
})
}
]
},
plugins: [
2017-11-09 20:28:18 +01:00
new UglifyJSPlugin({
include: ['vendor.js', 'popup/vendor.js']
}),
new webpack.SourceMapDevToolPlugin({
filename: '[name].js.map',
include: ['background.js', 'popup/app.js']
}),
extractLess
]
});