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

feat: add next plugin that deals with webpack workarounds #4

Merged
merged 2 commits into from
Nov 22, 2019

Conversation

satazor
Copy link
Contributor

@satazor satazor commented Nov 22, 2019

The canvas package, which is a dependency of jsdom, has a native binding which causes the following error during Next.js build process: "Module did not self-register".
We circuvent that by using a null-loader.
See vercel/next.js#7894

The ws package, which is also a dependency of jsdom, tries to optionally load some dependencies.
This produces a warning in webpack that we want to avoid.
We circuvent that by adding them to externals.

@codecov
Copy link

codecov bot commented Nov 22, 2019

Codecov Report

Merging #4 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #4   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          14     15    +1     
  Lines         206    218   +12     
  Branches       34     39    +5     
=====================================
+ Hits          206    218   +12
Impacted Files Coverage Δ
src/plugin.js 100% <100%> (ø)

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 adc8690...8f58c3d. Read the comment docs.

The canvas package, which is a dependency of jsdom, has a native binding which causes the following error during Next.js build process: "Module did not self-register".
We circuvent that by using a null-loader.
See vercel/next.js#7894

The ws package, which is also a dependency of jsdom, tries to optionally load some dependencies.
This produces a warning in webpack that we want to avoid.
We circuvent that by adding them to externals.
README.md Outdated Show resolved Hide resolved
Co-Authored-By: Ivo Lima Silva <[email protected]>
@ivolimasilva ivolimasilva merged commit fa44f95 into master Nov 22, 2019
@ivolimasilva ivolimasilva deleted the feat/plugin branch November 22, 2019 16:19
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.

2 participants