Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Stable hash fix #1095

Merged
merged 7 commits into from
Jun 15, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/erbium
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"description": "",
"main": "src/index.js",
"sideEffects": false,
"engines": {
"node": "12"
},
"scripts": {
"start": "NODE_ENV=development webpack-dev-server --mode development --hot",
"mock": "MOCK=true yarn start",
Expand Down Expand Up @@ -102,7 +105,7 @@
"eslint-plugin-react-hooks": "^4.0.0",
"eslint-utils": ">=2.0.0",
"favicons-webpack-plugin": "^3.0.1",
"file-loader": "^5.0.2",
"file-loader": "^6.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I was just updating webpack related stuff and left this in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also file-loader switched to md4 for caching in v6, which matches webpack default

"fork-ts-checker-webpack-plugin": "^4.0.3",
"frontmatter-markdown-loader": "^3.2.1",
"html-webpack-plugin": "^4.0.0-beta.11",
Expand Down
5 changes: 3 additions & 2 deletions webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ module.exports = ({ stats = false } = {}) => ({
devtool: isProduction ? 'source-map' : 'eval-source-map',
output: {
path: __dirname + '/dist',
chunkFilename: isProduction ? '[name].[chunkhash:4].js' : '[name].js',
filename: isProduction ? '[name].[chunkhash:4].js' : '[name].js',
chunkFilename: isProduction ? '[name].[contenthash].js' : '[name].js',
filename: isProduction ? '[name].[contenthash].js' : '[name].js',
publicPath: baseUrl,
},
module: {
Expand Down Expand Up @@ -188,6 +188,7 @@ module.exports = ({ stats = false } = {}) => ({
}),
].filter(Boolean),
optimization: {
moduleIds: 'hashed',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this change, although I think it was not affecting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, doesn't affect, will remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, it changed for me. Got QmdMLvyxKWSwvsKCLVhS2AgTWn9E91iU37xPJQMmoWRpdc
Try yarn build && ipfs add -rn dist a couple times with moduleIds: 'hashed', commented out

splitChunks: {
chunks: 'all',
minSize: 20000,
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6674,13 +6674,13 @@ file-entry-cache@^5.0.1:
dependencies:
flat-cache "^2.0.1"

file-loader@^5.0.2:
version "5.1.0"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-5.1.0.tgz#cb56c070efc0e40666424309bd0d9e45ac6f2bb8"
integrity sha512-u/VkLGskw3Ue59nyOwUwXI/6nuBCo7KBkniB/l7ICwr/7cPNGsL1WCXUp3GB0qgOOKU1TiP49bv4DZF/LJqprg==
file-loader@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.0.0.tgz#97bbfaab7a2460c07bcbd72d3a6922407f67649f"
integrity sha512-/aMOAYEFXDdjG0wytpTL5YQLfZnnTmLNjn+AIrJ/6HVnTfDqLsVKUUwkDf4I4kgex36BvjuXEn/TX9B/1ESyqQ==
dependencies:
loader-utils "^1.4.0"
schema-utils "^2.5.0"
loader-utils "^2.0.0"
schema-utils "^2.6.5"

file-type@5.2.0, file-type@^5.2.0:
version "5.2.0"
Expand Down Expand Up @@ -12797,7 +12797,7 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"

schema-utils@^2.0.0, schema-utils@^2.5.0, schema-utils@^2.6.5, schema-utils@^2.6.6:
schema-utils@^2.0.0, schema-utils@^2.6.5, schema-utils@^2.6.6:
version "2.7.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.0.tgz#17151f76d8eae67fbbf77960c33c676ad9f4efc7"
integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==
Expand Down