webpack_native 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7de7af5462dbfb7dca5f49cf88f7ff38c74839b978e2a22f9c0cbcd43fde38a2
|
4
|
+
data.tar.gz: 8cb00e2fe1480de8b395fbc7defc74aaf7b4a2907ed581a7e0b3b1427349734d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfdd2efc49ba5bde50842dd4a88792189408007ee8330e8f1d89217f39a14775cad8a3d7bc242962d9b41be3b3b7f42b00bcb3deb173c449b77c51ea6466131b
|
7
|
+
data.tar.gz: 430c6ed6d0eb694fe0c402a2ac9c871332d27c06d08e542cd387ea598176bc2d06d043d014c84598c2e300851334621eaffcb25841f7b468de1325cedc4fe1a3
|
@@ -15,7 +15,9 @@
|
|
15
15
|
"@babel/preset-env": "^7.11.5",
|
16
16
|
"autoprefixer": "^10.0.0",
|
17
17
|
"babel-loader": "^8.1.0",
|
18
|
+
"@gfx/zopfli": "^1.0.15",
|
18
19
|
"clean-webpack-plugin": "^3.0.0",
|
20
|
+
"compression-webpack-plugin": "^6.0.3",
|
19
21
|
"css-loader": "^4.3.0",
|
20
22
|
"file-loader": "^6.1.0",
|
21
23
|
"mini-css-extract-plugin": "^0.11.2",
|
@@ -3,6 +3,8 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
3
3
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
4
4
|
const TerserJSPlugin = require('terser-webpack-plugin');
|
5
5
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
6
|
+
const CompressionPlugin = require('compression-webpack-plugin');
|
7
|
+
const zopfli = require('@gfx/zopfli');
|
6
8
|
const WebpackManifestPlugin = require('webpack-manifest-plugin');
|
7
9
|
const webpack = require('webpack');
|
8
10
|
|
@@ -12,7 +14,7 @@ module.exports = (env, options) => {
|
|
12
14
|
|
13
15
|
return {
|
14
16
|
|
15
|
-
devtool: "cheap-module-eval-source-map",
|
17
|
+
devtool: devMode ? "cheap-module-eval-source-map" : undefined,
|
16
18
|
optimization: {
|
17
19
|
minimizer: [
|
18
20
|
new TerserJSPlugin({}),
|
@@ -78,8 +80,32 @@ module.exports = (env, options) => {
|
|
78
80
|
new CleanWebpackPlugin(),
|
79
81
|
new MiniCssExtractPlugin({
|
80
82
|
filename: devMode ? '[name].css' : '[name]-[contenthash].css',
|
83
|
+
}),
|
84
|
+
// In production, compress static files to .gz (using zopfli) and .br (using brotli) format
|
85
|
+
!devMode && new CompressionPlugin({
|
86
|
+
filename: '[path][base].gz[query]',
|
87
|
+
compressionOptions: {
|
88
|
+
numiterations: 15
|
89
|
+
},
|
90
|
+
algorithm(input, compressionOptions, callback) {
|
91
|
+
return zopfli.gzip(input, compressionOptions, callback);
|
92
|
+
},
|
93
|
+
test: /\.(js|css|html|svg|ico|eot|ttf|otf|map)$/,
|
94
|
+
threshold: 10240,
|
95
|
+
minRatio: 0.8,
|
96
|
+
deleteOriginalAssets: false
|
97
|
+
}),
|
98
|
+
!devMode && new CompressionPlugin({
|
99
|
+
filename: '[path][base].br',
|
100
|
+
algorithm: 'brotliCompress',
|
101
|
+
test: /\.(js|css|html|svg|ico|eot|ttf|otf|map)$/,
|
102
|
+
compressionOptions: {
|
103
|
+
level: 11,
|
104
|
+
},
|
105
|
+
threshold: 10240,
|
106
|
+
minRatio: 0.8,
|
81
107
|
})
|
82
|
-
],
|
108
|
+
].filter(Boolean), // filter(Boolean) to prevent false values when it's devMode
|
83
109
|
// resolve: {
|
84
110
|
// alias: {},
|
85
111
|
// modules: [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpack_native
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- scratchoo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Use vanilla webpack to manage your assets efficiently, no webpacker or
|
14
14
|
asset pipeline anymore!
|