Skip to content

Commit 8e2798e

Browse files
committed
tweaks and compress sass
1 parent 1b9f801 commit 8e2798e

File tree

6 files changed

+66
-10
lines changed

6 files changed

+66
-10
lines changed

config-overrides.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
1+
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin
2+
13
module.exports = function override (config, env) {
24
config.module.rules[1].oneOf.splice(config.module.rules[1].oneOf.length - 1, 0,
35
{
46
test: /\.scss$/,
5-
use: ['style-loader', 'css-loader', 'sass-loader']
7+
use: [
8+
'style-loader',
9+
'css-loader',
10+
{
11+
loader: 'sass-loader',
12+
options: {
13+
outputStyle: 'compressed'
14+
}
15+
}
16+
]
617
},
718
)
819
if (env === 'production') {
920
config.output.filename = 'static/socket.js'
1021
config.output.chunkFilename = 'static/socket.[chunkhash:8].chunk.js'
22+
if (process.env.ANALYSE) {
23+
config.plugins.push(
24+
new BundleAnalyzerPlugin({
25+
analyzerMode: 'static',
26+
reportFilename: 'report.html',
27+
})
28+
)
29+
}
1130
}
1231
// console.dir(config, { depth: 10, colors: true })
1332
return config

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"react-transition-group": "1.x",
4141
"sass-loader": "^6.0.6",
4242
"shelljs": "^0.7.8",
43-
"webpack": "^3.10.0"
43+
"webpack": "^3.10.0",
44+
"webpack-bundle-analyzer": "^2.9.1"
4445
}
4546
}

src/main.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
@import './styles/con-modal';
2222
@import './styles/enquiry';
2323
@import './styles/enquiry-button';
24-
@import './styles/enquiry-modal';
2524
@import './styles/tools';
2625
@import './styles/grid';
2726
@import './styles/input';

src/styles/enquiry-modal.scss

Whitespace-only changes.

src/styles/tools.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353
svg.tcs-svg {
5454
width: $svg-size;
5555
height: $svg-size;
56-
//path {
57-
// fill: $brand-colour;
58-
//}
5956
}
6057

6158
svg.tcs-close {

yarn.lock

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ acorn@^4.0.3, acorn@^4.0.4:
4343
version "4.0.13"
4444
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
4545

46-
acorn@^5.0.0, acorn@^5.2.1:
46+
acorn@^5.0.0, acorn@^5.1.1, acorn@^5.2.1:
4747
version "5.2.1"
4848
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
4949

@@ -264,6 +264,10 @@ async-foreach@^0.1.3:
264264
version "0.1.3"
265265
resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542"
266266

267+
async-limiter@~1.0.0:
268+
version "1.0.0"
269+
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
270+
267271
async@^1.4.0, async@^1.5.2:
268272
version "1.5.2"
269273
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
@@ -2008,6 +2012,10 @@ [email protected]:
20082012
version "1.1.1"
20092013
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
20102014

2015+
ejs@^2.5.6:
2016+
version "2.5.7"
2017+
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a"
2018+
20112019
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.28:
20122020
version "1.3.28"
20132021
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz#8dd4e6458086644e9f9f0a1cf32e2a1f9dffd9ee"
@@ -2396,7 +2404,7 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2:
23962404
dependencies:
23972405
homedir-polyfill "^1.0.1"
23982406

2399-
express@^4.13.3:
2407+
express@^4.13.3, express@^4.15.2:
24002408
version "4.16.2"
24012409
resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c"
24022410
dependencies:
@@ -2549,7 +2557,7 @@ fileset@^2.0.2:
25492557
glob "^7.0.3"
25502558
minimatch "^3.0.3"
25512559

2552-
2560+
[email protected], filesize@^3.5.9:
25532561
version "3.5.11"
25542562
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee"
25552563

@@ -2894,7 +2902,7 @@ growly@^1.3.0:
28942902
version "1.3.0"
28952903
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
28962904

2897-
2905+
[email protected], gzip-size@^3.0.0:
28982906
version "3.0.0"
28992907
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520"
29002908
dependencies:
@@ -4600,6 +4608,10 @@ onetime@^2.0.0:
46004608
dependencies:
46014609
mimic-fn "^1.0.0"
46024610

4611+
opener@^1.4.3:
4612+
version "1.4.3"
4613+
resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8"
4614+
46034615
[email protected], opn@^5.1.0:
46044616
version "5.1.0"
46054617
resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519"
@@ -6530,6 +6542,10 @@ uid-number@^0.0.6:
65306542
version "0.0.6"
65316543
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
65326544

6545+
ultron@~1.1.0:
6546+
version "1.1.1"
6547+
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
6548+
65336549
uniq@^1.0.1:
65346550
version "1.0.1"
65356551
resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
@@ -6713,6 +6729,22 @@ webidl-conversions@^4.0.0:
67136729
version "4.0.2"
67146730
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
67156731

6732+
webpack-bundle-analyzer@^2.9.1:
6733+
version "2.9.1"
6734+
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.9.1.tgz#c2c8e03e8e5768ed288b39ae9e27a8b8d7b9d476"
6735+
dependencies:
6736+
acorn "^5.1.1"
6737+
chalk "^1.1.3"
6738+
commander "^2.9.0"
6739+
ejs "^2.5.6"
6740+
express "^4.15.2"
6741+
filesize "^3.5.9"
6742+
gzip-size "^3.0.0"
6743+
lodash "^4.17.4"
6744+
mkdirp "^0.5.1"
6745+
opener "^1.4.3"
6746+
ws "^3.3.1"
6747+
67166748
webpack-dev-middleware@^1.11.0:
67176749
version "1.12.2"
67186750
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e"
@@ -6929,6 +6961,14 @@ write@^0.2.1:
69296961
dependencies:
69306962
mkdirp "^0.5.1"
69316963

6964+
ws@^3.3.1:
6965+
version "3.3.2"
6966+
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608"
6967+
dependencies:
6968+
async-limiter "~1.0.0"
6969+
safe-buffer "~5.1.0"
6970+
ultron "~1.1.0"
6971+
69326972
xdg-basedir@^2.0.0:
69336973
version "2.0.0"
69346974
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-2.0.0.tgz#edbc903cc385fc04523d966a335504b5504d1bd2"

0 commit comments

Comments
 (0)