Skip to content

Commit a60e45e

Browse files
🔨 Modified prod conf for long term cache
1 parent 6b7b4e3 commit a60e45e

File tree

5 files changed

+5
-31
lines changed

5 files changed

+5
-31
lines changed

‎package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
"webpack-bundle-analyzer": "^2.1.1",
8181
"webpack-dashboard": "^0.2.0",
8282
"webpack-dev-server": "beta",
83-
"webpack-md5-hash": "^0.0.5",
8483
"webpack-merge": "^1.0.2"
8584
}
8685
}

‎src/pages/components/router.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ const router = new VueRouter({
1010
base: '/components',
1111
routes: [
1212
{ path: '/', component: Index },
13-
{
14-
path: '/buttons',
15-
component: Buttons
16-
},
13+
{ path: '/buttons', component: Buttons },
1714
{ path: '*', component: () => System.import('components/NotFound') }
1815
],
1916
scrollBehavior (to, from, savedPosition) {

‎tools/urls.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const urls = {
1515
docs: path.resolve('docs'),
1616
node_modules: path.resolve('node_modules'),
1717
webpack: path.resolve('tools/webpack'),
18+
recordsPath: path.resolve('tools/webpack/records.json'),
1819
temp: path.resolve('tools/.temp'),
1920
/* resource urls */
2021
assets: path.resolve(src, 'assets'),

‎tools/webpack/conf.prod.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const merge = require('webpack-merge')
44

55
/* Webpack Plugins */
66
const ExtractTextPlugin = require('extract-text-webpack-plugin')
7-
const WebpackMd5Hash = require('webpack-md5-hash')
87
const ImageminPlugin = require('imagemin-webpack-plugin').default
98
const imageminMozjpeg = require('imagemin-mozjpeg')
109
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
@@ -48,9 +47,9 @@ const webpackConf = merge(webpackConfBase, {
4847
}),
4948
new ExtractTextPlugin('assets/css/[name].[contenthash:8].css'),
5049
new webpack.NamedModulesPlugin(),
51-
new WebpackMd5Hash(),
5250
new BundleAnalyzerPlugin()
53-
]
51+
],
52+
recordsPath: urls.recordsPath
5453
})
5554

5655
fs.writeFileSync(`${urls.temp}/config.prod.json`, JSON.stringify(webpackConf, null, 2), 'utf8')

‎yarn.lock

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,10 +1390,6 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
13901390
strip-ansi "^3.0.0"
13911391
supports-color "^2.0.0"
13921392

1393-
charenc@~0.0.1:
1394-
version "0.0.1"
1395-
resolved "http://registry.npm.taobao.org/charenc/download/charenc-0.0.1.tgz#004cff9feaf102382ed12db58dd6f962796d6e88"
1396-
13971393
chokidar@^1.0.0, chokidar@^1.4.3, chokidar@^1.6.0:
13981394
version "1.6.1"
13991395
resolved "http://registry.npm.taobao.org/chokidar/download/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2"
@@ -1736,10 +1732,6 @@ cross-spawn@^4.0.0:
17361732
lru-cache "^4.0.1"
17371733
which "^1.2.9"
17381734

1739-
crypt@~0.0.1:
1740-
version "0.0.1"
1741-
resolved "http://registry.npm.taobao.org/crypt/download/crypt-0.0.1.tgz#5f11b21a6c05ef1b5e79708366da6374ece1e6a2"
1742-
17431735
cryptiles@2.x.x:
17441736
version "2.0.5"
17451737
resolved "http://registry.npm.taobao.org/cryptiles/download/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -3736,7 +3728,7 @@ is-binary-path@^1.0.0:
37363728
dependencies:
37373729
binary-extensions "^1.0.0"
37383730

3739-
is-buffer@^1.0.2, is-buffer@~1.1.1:
3731+
is-buffer@^1.0.2:
37403732
version "1.1.4"
37413733
resolved "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b"
37423734

@@ -4367,14 +4359,6 @@ math-expression-evaluator@^1.2.14:
43674359
dependencies:
43684360
lodash.indexof "^4.0.5"
43694361

4370-
md5@^2.0.0:
4371-
version "2.2.1"
4372-
resolved "http://registry.npm.taobao.org/md5/download/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9"
4373-
dependencies:
4374-
charenc "~0.0.1"
4375-
crypt "~0.0.1"
4376-
is-buffer "~1.1.1"
4377-
43784362
media-typer@0.3.0:
43794363
version "0.3.0"
43804364
resolved "http://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -7093,12 +7077,6 @@ webpack-dev-server@beta:
70937077
webpack-dev-middleware "^1.4.0"
70947078
yargs "^6.0.0"
70957079

7096-
webpack-md5-hash@^0.0.5:
7097-
version "0.0.5"
7098-
resolved "http://registry.npm.taobao.org/webpack-md5-hash/download/webpack-md5-hash-0.0.5.tgz#d9f1899ead664459dd8b6b0c926ac71cfbd7bc7a"
7099-
dependencies:
7100-
md5 "^2.0.0"
7101-
71027080
webpack-merge@^1.0.2:
71037081
version "1.0.2"
71047082
resolved "http://registry.npm.taobao.org/webpack-merge/download/webpack-merge-1.0.2.tgz#b28f4c895361f1a985a96952760d7170679779b4"

0 commit comments

Comments
 (0)