-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfixes for new webpack5 integration (#58)
- Switch from `compilation` to `thisCompilation` hook to capture compilation for later use. Fixes #57, fixes #55 - Switch `processAssets` stage from `PROCESS_ASSETS_STAGE_SUMMARIZE` to `PROCESS_ASSETS_STAGE_REPORT`. Fixes #56
- Loading branch information
1 parent
9d63bea
commit 7f28701
Showing
5 changed files
with
100 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
|
||
"use strict"; | ||
|
||
/** | ||
* Regression test for: https://github.com/FormidableLabs/webpack-stats-plugin/issues/56 | ||
*/ | ||
const path = require("path"); | ||
const { StatsWriterPlugin } = require("../../../index"); | ||
|
||
module.exports = { | ||
mode: "production", | ||
context: __dirname, | ||
entry: { | ||
main: "../../src/main.js" | ||
}, | ||
output: { | ||
path: path.join(__dirname, "build"), | ||
publicPath: "/website-o-doom/", | ||
filename: "contenthash.[contenthash].main.js" | ||
}, | ||
devtool: false, | ||
plugins: [ | ||
new StatsWriterPlugin({ | ||
filename: "stats-contenthash.json", | ||
fields: ["entrypoints"] | ||
}) | ||
], | ||
optimization: { | ||
splitChunks: { | ||
cacheGroups: { | ||
vendors: { | ||
priority: -10, | ||
test: /[\\/]node_modules[\\/]/ | ||
} | ||
}, | ||
chunks: "async", | ||
minChunks: 1, | ||
minSize: 30000, | ||
name: false | ||
} | ||
} | ||
}; |