webpack speed improvements + minor fixtures

This commit is contained in:
Tony Air 2020-02-25 13:23:49 +07:00
parent 918cf66907
commit c88da3d9b0
5 changed files with 17 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<% if $ImageResized %>
<div class="image-element__image<% if $Resize %><% if $Height %> height{$Height}<% end_if %><% if $Width %> width{$Width}<% end_if %><% end_if %>">
<% if $ImageLink %><a href="$ImageLink.URL"><% end_if %>
<% if $ImageLink %><a href="$ImageLink.LinkURL"><% end_if %>
<img
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
data-lazy-src="$ImageResized.URL" class="img-responsive" alt="$Title.ATT"
@ -18,7 +18,7 @@
<% end_if %>
<% if $ImageLink %>
<a href="$ImageLink.URL" class="image-element__btn btn btn-default">
<a href="$ImageLink.LinkURL" class="image-element__btn btn btn-default">
$ImageLink.Title
<i class="fas fa-caret-right"></i>
</a>

View File

@ -11,10 +11,15 @@ $MetaTags
<meta property="og:url" content="{$AbsoluteLink}" />
<meta property="og:site_name" content="{$SiteConfig.Title}" />
<meta property="og:locale" content="$ContentLocale.ATT" />
<% if $MetaTitle %>
<meta property="og:title" content="{$SiteConfig.Title} - {$MetaTitle}" />
<meta property="og:title" content="{$MetaTitle} - {$SiteConfig.Title}" />
<meta property="og:image:alt" content="{$MetaTitle}" />
<% else %>
<meta property="og:title" content="{$Title} - {$SiteConfig.Title}" />
<meta property="og:image:alt" content="{$Title}" />
<% end_if %>
<% if $MetaDescription %>
<meta property="og:description" content="{$MetaDescription}" />
<% end_if %>

View File

@ -1,4 +1,4 @@
<style>
body,html{font-size:14px;margin:0;padding:0;background:#fff;color:#333}#PageLoading{position:fixed;left:0;top:0;margin:0;width:100%!important;height:100%!important;background:rgba(255,255,255,.9);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:9999}.main-bn{position:fixed;top:0;left:0;width:100%;z-index:99999999;padding:0.5rem 1rem;text-align:center;color:#fff;background:#FF0000}img,iframe{max-width:100%}.loading-spinner{text-align:center}
body,html{font-size:14px;margin:0;padding:0;background:#fff;color:#333;overflow-x:hidden}#PageLoading{position:fixed;left:0;top:0;margin:0;width:100%!important;height:100%!important;background:rgba(255,255,255,.9);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:9999}.main-bn{position:fixed;top:0;left:0;width:100%;z-index:99999999;padding:0.5rem 1rem;text-align:center;color:#fff;background:#FF0000}img,iframe{max-width:100%}.loading-spinner{text-align:center}
.lds-ellipsis{display:inline-block;position:relative;width:64px;height:64px}.lds-ellipsis div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#888;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:6px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:6px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:26px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:45px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(19px, 0)}}
</style>

View File

@ -72,6 +72,7 @@
"font-awesome": "^4.7.0",
"foundation-emails": "^2.2.1",
"gijgo": "^1.9.13",
"hard-source-webpack-plugin": "^0.13.1",
"html-webpack-plugin": "^4.0.0-beta.11",
"imagemin-gifsicle": "^7.0.0",
"imagemin-jpegtran": "^6.0.0",
@ -84,6 +85,7 @@
"jquery-zoom": "^1.7.21",
"jquery.appear": "^1.0.1",
"laravel-mix": "^4.1.2",
"loglevel": "^1.6.7",
"lost": "^8.3.1",
"mapbox-gl": "^1.6.1",
"material-design-color": "^2.3.2",

View File

@ -6,6 +6,7 @@ const webpack = require('webpack');
const commonVariables = require('./webpack.configuration');
const conf = commonVariables.configuration;
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const path = require('path');
const filesystem = require('fs');
@ -123,10 +124,12 @@ module.exports = {
['@babel/transform-react-jsx'],
['react-hot-loader/babel'],
],
cacheDirectory: true,
cacheCompression: false,
},
},
},
{
/*{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
@ -134,7 +137,7 @@ module.exports = {
{
test: /\.coffee?$/,
use: 'coffee-loader',
},
},*/
{
test: /\.worker\.js$/,
use: {
@ -168,5 +171,6 @@ module.exports = {
Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
}),
new HardSourceWebpackPlugin(),
],
};