mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
webpack speed improvements + minor fixtures
This commit is contained in:
parent
918cf66907
commit
c88da3d9b0
@ -1,6 +1,6 @@
|
|||||||
<% if $ImageResized %>
|
<% if $ImageResized %>
|
||||||
<div class="image-element__image<% if $Resize %><% if $Height %> height{$Height}<% end_if %><% if $Width %> width{$Width}<% end_if %><% end_if %>">
|
<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
|
<img
|
||||||
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
|
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
|
||||||
data-lazy-src="$ImageResized.URL" class="img-responsive" alt="$Title.ATT"
|
data-lazy-src="$ImageResized.URL" class="img-responsive" alt="$Title.ATT"
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% if $ImageLink %>
|
<% 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
|
$ImageLink.Title
|
||||||
<i class="fas fa-caret-right"></i>
|
<i class="fas fa-caret-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -11,10 +11,15 @@ $MetaTags
|
|||||||
<meta property="og:url" content="{$AbsoluteLink}" />
|
<meta property="og:url" content="{$AbsoluteLink}" />
|
||||||
<meta property="og:site_name" content="{$SiteConfig.Title}" />
|
<meta property="og:site_name" content="{$SiteConfig.Title}" />
|
||||||
<meta property="og:locale" content="$ContentLocale.ATT" />
|
<meta property="og:locale" content="$ContentLocale.ATT" />
|
||||||
|
|
||||||
<% if $MetaTitle %>
|
<% 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}" />
|
<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 %>
|
<% end_if %>
|
||||||
|
|
||||||
<% if $MetaDescription %>
|
<% if $MetaDescription %>
|
||||||
<meta property="og:description" content="{$MetaDescription}" />
|
<meta property="og:description" content="{$MetaDescription}" />
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<style>
|
<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)}}
|
.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>
|
</style>
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"foundation-emails": "^2.2.1",
|
"foundation-emails": "^2.2.1",
|
||||||
"gijgo": "^1.9.13",
|
"gijgo": "^1.9.13",
|
||||||
|
"hard-source-webpack-plugin": "^0.13.1",
|
||||||
"html-webpack-plugin": "^4.0.0-beta.11",
|
"html-webpack-plugin": "^4.0.0-beta.11",
|
||||||
"imagemin-gifsicle": "^7.0.0",
|
"imagemin-gifsicle": "^7.0.0",
|
||||||
"imagemin-jpegtran": "^6.0.0",
|
"imagemin-jpegtran": "^6.0.0",
|
||||||
@ -84,6 +85,7 @@
|
|||||||
"jquery-zoom": "^1.7.21",
|
"jquery-zoom": "^1.7.21",
|
||||||
"jquery.appear": "^1.0.1",
|
"jquery.appear": "^1.0.1",
|
||||||
"laravel-mix": "^4.1.2",
|
"laravel-mix": "^4.1.2",
|
||||||
|
"loglevel": "^1.6.7",
|
||||||
"lost": "^8.3.1",
|
"lost": "^8.3.1",
|
||||||
"mapbox-gl": "^1.6.1",
|
"mapbox-gl": "^1.6.1",
|
||||||
"material-design-color": "^2.3.2",
|
"material-design-color": "^2.3.2",
|
||||||
|
@ -6,6 +6,7 @@ const webpack = require('webpack');
|
|||||||
const commonVariables = require('./webpack.configuration');
|
const commonVariables = require('./webpack.configuration');
|
||||||
const conf = commonVariables.configuration;
|
const conf = commonVariables.configuration;
|
||||||
|
|
||||||
|
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const filesystem = require('fs');
|
const filesystem = require('fs');
|
||||||
|
|
||||||
@ -123,10 +124,12 @@ module.exports = {
|
|||||||
['@babel/transform-react-jsx'],
|
['@babel/transform-react-jsx'],
|
||||||
['react-hot-loader/babel'],
|
['react-hot-loader/babel'],
|
||||||
],
|
],
|
||||||
|
cacheDirectory: true,
|
||||||
|
cacheCompression: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
/*{
|
||||||
test: /\.tsx?$/,
|
test: /\.tsx?$/,
|
||||||
use: 'ts-loader',
|
use: 'ts-loader',
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
@ -134,7 +137,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.coffee?$/,
|
test: /\.coffee?$/,
|
||||||
use: 'coffee-loader',
|
use: 'coffee-loader',
|
||||||
},
|
},*/
|
||||||
{
|
{
|
||||||
test: /\.worker\.js$/,
|
test: /\.worker\.js$/,
|
||||||
use: {
|
use: {
|
||||||
@ -168,5 +171,6 @@ module.exports = {
|
|||||||
Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
|
Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
|
||||||
Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
|
Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
|
||||||
}),
|
}),
|
||||||
|
new HardSourceWebpackPlugin(),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user