mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
minify vendor
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
require('jquery');
|
window.$ = window.jQuery = require('jquery');
|
||||||
require('bootstrap');
|
require('bootstrap');
|
||||||
require('papaparse');
|
require('papaparse');
|
||||||
require('clipboard');
|
require('clipboard');
|
||||||
|
|||||||
@@ -61,11 +61,6 @@ module.exports = {
|
|||||||
new CleanWebpackPlugin([
|
new CleanWebpackPlugin([
|
||||||
path.resolve(__dirname, 'dist/*')
|
path.resolve(__dirname, 'dist/*')
|
||||||
]),
|
]),
|
||||||
new webpack.ProvidePlugin({
|
|
||||||
$: 'jquery',
|
|
||||||
jQuery: 'jquery',
|
|
||||||
'window.jQuery': 'jquery'
|
|
||||||
}),
|
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
new webpack.optimize.CommonsChunkPlugin({
|
||||||
name: 'popup/vendor',
|
name: 'popup/vendor',
|
||||||
chunks: ['popup/app'],
|
chunks: ['popup/app'],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
//const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||||
const common = require('./webpack.common.js');
|
const common = require('./webpack.common.js');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
|
|
||||||
@@ -29,13 +29,9 @@ module.exports = merge(common, {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
// UglifyJS does not support es6
|
new UglifyJSPlugin({
|
||||||
// ref: https://github.com/webpack/webpack/issues/2972#issuecomment-261705632
|
include: ['vendor.js', 'popup/vendor.js']
|
||||||
//new UglifyJSPlugin({
|
}),
|
||||||
// uglifyOptions: {
|
|
||||||
// mangle: false
|
|
||||||
// }
|
|
||||||
//}),
|
|
||||||
new webpack.SourceMapDevToolPlugin({
|
new webpack.SourceMapDevToolPlugin({
|
||||||
filename: '[name].js.map',
|
filename: '[name].js.map',
|
||||||
include: ['background.js', 'popup/app.js']
|
include: ['background.js', 'popup/app.js']
|
||||||
|
|||||||
Reference in New Issue
Block a user