advanced aggregate, webpack gzip

This commit is contained in:
Bachir Soussi Chiadmi 2021-05-27 16:39:15 +02:00
parent 97d14c297c
commit 54d5b054f7
47 changed files with 81 additions and 10 deletions

1
.gitignore vendored
View File

@ -44,3 +44,4 @@ node_modules/
config/sync/flag.flag.*.yml config/sync/flag.flag.*.yml
config/sync/system.action.flag_action.*.yml config/sync/system.action.flag_action.*.yml

View File

@ -6,6 +6,7 @@ const baseConfig = require('./webpack.config.base')
const MiniCssExtractPlugin = require('mini-css-extract-plugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const TerserPlugin = require("terser-webpack-plugin"); const TerserPlugin = require("terser-webpack-plugin");
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = merge(baseConfig, { module.exports = merge(baseConfig, {
mode: 'production', mode: 'production',
@ -74,6 +75,7 @@ module.exports = merge(baseConfig, {
}), }),
new BundleAnalyzerPlugin({ new BundleAnalyzerPlugin({
'analyzerMode': 'static' 'analyzerMode': 'static'
}) }),
new CompressionPlugin(),
] ]
}) })

8
composer.lock generated
View File

@ -2720,7 +2720,7 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.drupalcode.org/project/advagg.git", "url": "https://git.drupalcode.org/project/advagg.git",
"reference": "998266aa62c7f6a3beaa5b79a219f8c6dc4e8b92" "reference": "631b11135c8d435ad5cb2798a26806b4257a347a"
}, },
"require": { "require": {
"drupal/core": "^8.8 || ^9", "drupal/core": "^8.8 || ^9",
@ -2732,8 +2732,8 @@
"dev-4.x": "4.x-dev" "dev-4.x": "4.x-dev"
}, },
"drupal": { "drupal": {
"version": "8.x-4.1+4-dev", "version": "8.x-4.1+5-dev",
"datestamp": "1610042748", "datestamp": "1610050173",
"security-coverage": { "security-coverage": {
"status": "not-covered", "status": "not-covered",
"message": "Dev releases are not covered by Drupal security advisories." "message": "Dev releases are not covered by Drupal security advisories."
@ -2790,7 +2790,7 @@
"issues": "https://drupal.org/project/issues/advagg", "issues": "https://drupal.org/project/issues/advagg",
"irc": "irc://irc.freenode.org/drupal-contribute" "irc": "irc://irc.freenode.org/drupal-contribute"
}, },
"time": "2021-01-07T20:09:11+00:00" "time": "2021-04-27T14:09:50+00:00"
}, },
{ {
"name": "drupal/advanced_text_formatter", "name": "drupal/advanced_text_formatter",

View File

@ -0,0 +1,26 @@
css:
brotli: true
combine_media: false
fix_type: true
preserve_external: false
dns_prefetch: false
path:
convert:
absolute_to_protocol_relative: true
absolute: false
force_https: false
cache_level: 2
cron_frequency: 86400
enabled: true
global_counter: 0
immutable: true
js:
brotli: true
fix_type: true
preserve_external: false
skip_enabled_preprocess_check: false
show_bypass_cookie_message: true
symlinks: false
symlinksifownermatch: false
_core:
default_config_hash: Vi3b7DLLNw5X1UX9XG8mnU-ysvyNgdyvAasxV9yck3I

View File

@ -3,6 +3,7 @@ module:
address: 0 address: 0
admin_toolbar: 0 admin_toolbar: 0
admin_toolbar_links_access_filter: 0 admin_toolbar_links_access_filter: 0
advagg: 0
advanced_text_formatter: 0 advanced_text_formatter: 0
advancedqueue: 0 advancedqueue: 0
amswap: 0 amswap: 0

View File

@ -12,7 +12,7 @@ urls_to_exclude: "admin/.*\r\nuser/.*"
offline_page: /offline offline_page: /offline
cache_version: '1' cache_version: '1'
cross_origin: false cross_origin: false
skip_waiting: false skip_waiting: true
_core: _core:
default_config_hash: cP1TZQyv1WdET3iepl2QoyOPK7VeO0xHm0lU_FU1Wmc default_config_hash: cP1TZQyv1WdET3iepl2QoyOPK7VeO0xHm0lU_FU1Wmc
image: /sites/default/files/pwa/PWA-icon.png image: /sites/default/files/pwa/PWA-icon.png

View File

@ -0,0 +1,17 @@
uuid: 17ec0f7b-9a3b-4907-a034-564431be92ae
langcode: en
status: true
dependencies:
module:
- advagg
title: 'Default cron handler'
id: advagg_cron
weight: 0
module: advagg
callback: advagg_cron
scheduler:
id: simple
launcher:
id: serial
logger:
id: database

23
package-lock.json generated
View File

@ -3186,6 +3186,29 @@
"integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
"dev": true "dev": true
}, },
"compression-webpack-plugin": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/compression-webpack-plugin/-/compression-webpack-plugin-8.0.0.tgz",
"integrity": "sha512-/pBUx1gV8nL6YPKKa9QRs4xoemU28bfqAu8z5hLy2eTrWog4fU8lQYtlpbYwCWtIfAHLxsgSUHjk9RqK6UL+Yw==",
"dev": true,
"requires": {
"schema-utils": "^3.0.0",
"serialize-javascript": "^5.0.1"
},
"dependencies": {
"schema-utils": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.6",
"ajv": "^6.12.5",
"ajv-keywords": "^3.5.2"
}
}
}
},
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",

View File

@ -42,6 +42,7 @@
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3", "babel-jest": "^26.6.3",
"babel-loader": "^8.2.1", "babel-loader": "^8.2.1",
"compression-webpack-plugin": "^8.0.0",
"copy-webpack-plugin": "^6.3.2", "copy-webpack-plugin": "^6.3.2",
"css-loader": "^5.0.1", "css-loader": "^5.0.1",
"eslint": "^7.14.0", "eslint": "^7.14.0",

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -17,7 +17,7 @@ export default {
} }
}, },
beforeMount() { beforeMount() {
// console.log('Home beforeMount') console.log('Home beforeMount, full', this.full)
// compile the html src (coming from parent with props or from ajax call) // compile the html src (coming from parent with props or from ajax call)
if (this.html) { if (this.html) {
// console.log('html', this.html) // console.log('html', this.html)