Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove webpack-chunk-hash plugin #608

Merged
merged 1 commit into from Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/WebpackConfig.js
Expand Up @@ -732,10 +732,6 @@ class WebpackConfig {
}
}

if (typeof configuredFilenames.js !== 'undefined' && configuredFilenames.js.includes('[chunkhash')) {
logger.deprecation('Using the [chunkhash] placeholder in any filenames is deprecated: use [contenthash] instead.');
}

this.configuredFilenames = configuredFilenames;
}

Expand Down
1 change: 0 additions & 1 deletion lib/plugins/plugin-priorities.js
Expand Up @@ -14,7 +14,6 @@ module.exports = {
DeleteUnusedEntriesJSPlugin: 130,
WebpackManifestPlugin: 120,
LoaderOptionsPlugin: 110,
WebpackChunkHash: 100,
ProvidePlugin: 90,
CleanWebpackPlugin: 80,
DefinePlugin: 70,
Expand Down
9 changes: 0 additions & 9 deletions lib/plugins/versioning.js
Expand Up @@ -10,7 +10,6 @@
'use strict';

const webpack = require('webpack');
const WebpackChunkHash = require('webpack-chunk-hash');
const WebpackConfig = require('../WebpackConfig'); //eslint-disable-line no-unused-vars
const PluginPriorities = require('./plugin-priorities');

Expand Down Expand Up @@ -49,12 +48,4 @@ module.exports = function(plugins, webpackConfig) {
// No plugin is added. But, see the "optimizations" config,
// for inclusion of the "named modules".
}

if (webpackConfig.useVersioning) {
// enables the [chunkhash] ability, which is deprecated
plugins.push({
plugin: new WebpackChunkHash(),
priority: PluginPriorities.WebpackChunkHash
});
}
};
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -49,7 +49,6 @@
"terser-webpack-plugin": "^1.1.0",
"tmp": "^0.0.33",
"webpack": "^4.20.0",
"webpack-chunk-hash": "^0.6.0",
"webpack-cli": "^3.0.0",
"webpack-dev-server": "^3.1.14",
"webpack-manifest-plugin": "^2.0.2",
Expand Down
17 changes: 0 additions & 17 deletions test/WebpackConfig.js
Expand Up @@ -1113,23 +1113,6 @@ describe('WebpackConfig object', () => {
});
}).to.throw('"foo" is not a valid key');
});

it('Using chunkhash is deprecated', () => {
logger.reset();
logger.quiet();

after(() => {
logger.quiet(false);
});

const config = createConfig();

config.configureFilenames({
js: 'file.[chunkhash:16].js'
});

expect(logger.getMessages().deprecation).to.not.be.empty;
});
});

describe('configureUrlLoader', () => {
Expand Down
6 changes: 3 additions & 3 deletions test/functional.js
Expand Up @@ -431,8 +431,8 @@ describe('Functional tests using webpack', function() {
config.addStyleEntry('styles', './css/h1_style.css');
config.enableVersioning(true);
config.configureFilenames({
js: '[name].js?[chunkhash:16]',
css: '[name].css?[chunkhash:16]'
js: '[name].js?[contenthash:16]',
css: '[name].css?[contenthash:16]'
});

testSetup.runWebpack(config, (webpackAssert) => {
Expand All @@ -448,7 +448,7 @@ describe('Functional tests using webpack', function() {
);
webpackAssert.assertManifestPath(
'styles.css',
'/styles.css?91597a40238e0e66'
'/styles.css?8ec316547cc77b39'
);

done();
Expand Down
35 changes: 0 additions & 35 deletions yarn.lock
Expand Up @@ -696,11 +696,6 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@types/anymatch@*":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==

"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
Expand Down Expand Up @@ -730,29 +725,6 @@
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"
integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==

"@types/tapable@*":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
integrity sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==

"@types/uglify-js@*":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
integrity sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==
dependencies:
source-map "^0.6.1"

"@types/webpack@^3.0.0 || ^4.0.0":
version "4.32.1"
resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.32.1.tgz#6e95010e806f808abd6551c112097ac09035aacf"
integrity sha512-9n38CBx9uga1FEAdTipnt0EkbKpsCJFh7xJb1LE65FFb/A6OOLFX022vYsGC1IyVCZ/GroNg9u/RMmlDxGcLIw==
dependencies:
"@types/anymatch" "*"
"@types/node" "*"
"@types/tapable" "*"
"@types/uglify-js" "*"
source-map "^0.6.0"

"@vue/babel-helper-vue-jsx-merge-props@^1.0.0", "@vue/babel-helper-vue-jsx-merge-props@^1.0.0-beta.3":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.0.0.tgz#048fe579958da408fb7a8b2a3ec050b50a661040"
Expand Down Expand Up @@ -8370,13 +8342,6 @@ webidl-conversions@^4.0.2:
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==

webpack-chunk-hash@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/webpack-chunk-hash/-/webpack-chunk-hash-0.6.0.tgz#eca36aff76e327d08a18a3e7990eb46e68376818"
integrity sha512-FsOg1RpW2nf3nYpGTy/Qs59RZ7gYG+sI4VrCE8TIBQYh/Kogi04xD39Pj9zUEeUcNx9HeTVPGSO3mtmpLeX9eQ==
dependencies:
"@types/webpack" "^3.0.0 || ^4.0.0"

webpack-cli@^3.0.0:
version "3.3.6"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.6.tgz#2c8c399a2642133f8d736a359007a052e060032c"
Expand Down