Skip to content

Conversation

@SinimaWath
Copy link

@SinimaWath SinimaWath commented May 20, 2021

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Template in webpack 4 has different place.

That fix bug in nextjs. vercel/next.js#25276

Breaking Changes

Additional Info

@SinimaWath SinimaWath changed the title Handle template for webpack4 Handle Template for webpack4 May 20, 2021
polyakov713
polyakov713 previously approved these changes May 20, 2021
PsychoSanchez
PsychoSanchez previously approved these changes May 20, 2021
ArchieSA
ArchieSA previously approved these changes May 21, 2021
@codecov
Copy link

codecov bot commented May 21, 2021

Codecov Report

Merging #759 (77947af) into master (d31013d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #759   +/-   ##
=======================================
  Coverage   89.31%   89.31%           
=======================================
  Files           6        6           
  Lines         805      805           
  Branches      247      248    +1     
=======================================
  Hits          719      719           
  Misses         83       83           
  Partials        3        3           
Impacted Files Coverage Δ
src/index.js 87.94% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d31013d...77947af. Read the comment docs.

@alexander-akait
Copy link
Member

Can you accept CLA?

@SinimaWath
Copy link
Author

CLA? What does it mean?

@alexander-akait
Copy link
Member

@alexander-akait
Copy link
Member

You can found this in our github actions

@SinimaWath
Copy link
Author

done

@alexander-akait
Copy link
Member

@SinimaWath Can you use the same email in commit(s)?

});

const { Template } = webpack;
const Template = webpack.Template || webpack.webpack.Template;
Copy link
Member

Choose a reason for hiding this comment

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

webpack.webpack doesn't exist in webpack v4 and v5, also we use:

const webpack = compiler.webpack
      ? compiler.webpack
      : // eslint-disable-next-line global-require
        require('webpack');

and for v4 and v5 we have only webpack.Template

@alexander-akait
Copy link
Member

Anyway thanks for PR

@alexander-akait
Copy link
Member

Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants