Skip to content

Commit

Permalink
Replace last deprecated webpack plugin API usage
Browse files Browse the repository at this point in the history
Test plan:
 - Tests pass

flag=none

Closes FOO-2565

Change-Id: Ie6a2e0543824150372c514cc2bdc559cf214e259
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278063
Tested-by: Service Cloud Jenkins <[email protected]>
Reviewed-by: Ahmad Amireh <[email protected]>
QA-Review: Ahmad Amireh <[email protected]>
Product-Review: Ahmad Amireh <[email protected]>
  • Loading branch information
aaronshaf committed Nov 11, 2021
1 parent 15b4b78 commit 47529e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui-build/webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ module.exports = {
.concat(
// return a non-zero exit code if there are any warnings so we don't continue compiling assets if webpack fails
process.env.WEBPACK_PEDANTIC !== '0'
? function () {
this.plugin('done', ({compilation}) => {
? function (compiler) {
compiler.hooks.done.tap('Canvas:FailOnWebpackWarnings', (compilation) => {
if (compilation.warnings && compilation.warnings.length) {
console.error(compilation.warnings)
// If there's a bad import, webpack doesn't say where.
Expand Down

0 comments on commit 47529e8

Please sign in to comment.