Skip to content

Commit

Permalink
Merge pull request #2186 from patzick/build-compression-and-removing-…
Browse files Browse the repository at this point in the history
…sourcemap

Build compression and removing sourcemap
  • Loading branch information
filrak committed Jan 14, 2019
2 parents f10e83d + 6e16f13 commit f8a36c6
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 9 deletions.
5 changes: 3 additions & 2 deletions core/build/webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ const isProd = process.env.NODE_ENV === 'production'
module.exports = {
plugins: [
new webpack.ProgressPlugin(),
// new BundleAnalyzerPlugin(),
// new BundleAnalyzerPlugin({
// generateStatsFile: true
// }),
new CaseSensitivePathsPlugin(),
new VueLoaderPlugin(),
// generate output HTML
Expand Down Expand Up @@ -76,7 +78,6 @@ module.exports = {
inject: isProd == false
})
],
devtool: 'source-map',
entry: {
app: ['babel-polyfill', './core/client-entry.ts']
},
Expand Down
6 changes: 5 additions & 1 deletion core/build/webpack.prod.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ const merge = require('webpack-merge')
const baseClientConfig = require('./webpack.client.config')
const themeRoot = require('./theme-path')
const extendedConfig = require(path.join(themeRoot, '/webpack.config.js'))
const CompressionPlugin = require('compression-webpack-plugin')

const prodClientConfig = merge(baseClientConfig, {
mode: 'production'
mode: 'production',
plugins: [
new CompressionPlugin()
]
})

module.exports = extendedConfig(prodClientConfig, {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"chai": "^4.1.2",
"command-exists": "^1.2.2",
"commander": "^2.18.0",
"compression-webpack-plugin": "^2.0.0",
"cross-env": "^3.1.4",
"css-loader": "^1.0.0",
"cypress": "^3.0.2",
Expand Down
51 changes: 45 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,7 @@ bluebird@3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c"

bluebird@^3.1.1, bluebird@^3.3.0, bluebird@^3.5.1:
bluebird@^3.1.1, bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3:
version "3.5.3"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7"

Expand Down Expand Up @@ -2441,6 +2441,26 @@ cacache@^11.0.2:
unique-filename "^1.1.0"
y18n "^4.0.0"

cacache@^11.2.0:
version "11.3.2"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa"
integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==
dependencies:
bluebird "^3.5.3"
chownr "^1.1.1"
figgy-pudding "^3.5.1"
glob "^7.1.3"
graceful-fs "^4.1.15"
lru-cache "^5.1.1"
mississippi "^3.0.0"
mkdirp "^0.5.1"
move-concurrently "^1.0.1"
promise-inflight "^1.0.1"
rimraf "^2.6.2"
ssri "^6.0.1"
unique-filename "^1.1.1"
y18n "^4.0.0"

cache-base@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
Expand Down Expand Up @@ -2951,6 +2971,18 @@ component-inherit@0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143"

compression-webpack-plugin@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/compression-webpack-plugin/-/compression-webpack-plugin-2.0.0.tgz#46476350c1eb27f783dccc79ac2f709baa2cffbc"
integrity sha512-bDgd7oTUZC8EkRx8j0sjyCfeiO+e5sFcfgaFcjVhfQf5lLya7oY2BczxcJ7IUuVjz5m6fy8IECFmVFew3xLk8Q==
dependencies:
cacache "^11.2.0"
find-cache-dir "^2.0.0"
neo-async "^2.5.0"
schema-utils "^1.0.0"
serialize-javascript "^1.4.0"
webpack-sources "^1.0.1"

concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
Expand Down Expand Up @@ -5026,7 +5058,7 @@ glob@7.1.2:
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1:
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1:
version "7.1.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
dependencies:
Expand Down Expand Up @@ -5143,7 +5175,7 @@ got@^6.7.1:
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"

graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"

Expand Down Expand Up @@ -6718,6 +6750,13 @@ lru-cache@4.1.x, lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache
pseudomap "^1.0.2"
yallist "^2.1.2"

lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
dependencies:
yallist "^3.0.2"

"magento2-rest-client@github:DivanteLtd/magento2-rest-client":
version "0.0.7"
resolved "https://codeload.github.com/DivanteLtd/magento2-rest-client/tar.gz/77b217ba140a1bc484697e1d141676b8b5c83933"
Expand Down Expand Up @@ -9439,7 +9478,7 @@ ssri@^5.2.4:
dependencies:
safe-buffer "^5.1.1"

ssri@^6.0.0:
ssri@^6.0.0, ssri@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
dependencies:
Expand Down Expand Up @@ -10120,7 +10159,7 @@ uniqs@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"

unique-filename@^1.1.0:
unique-filename@^1.1.0, unique-filename@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230"
dependencies:
Expand Down Expand Up @@ -10702,7 +10741,7 @@ webpack-serve@^1.0.2:
webpack-hot-client "^3.0.0"
webpack-log "^1.1.2"

webpack-sources@^1.1.0, webpack-sources@^1.3.0:
webpack-sources@^1.0.1, webpack-sources@^1.1.0, webpack-sources@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85"
dependencies:
Expand Down

0 comments on commit f8a36c6

Please sign in to comment.