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

fix: do not register the plugin twice #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: do not register the plugin twice #183

wants to merge 1 commit into from

Conversation

anshumanv
Copy link
Member

What kind of change does this PR introduce?
fix

Did you add tests for your changes?
yes

If relevant, did you update the documentation?
NA

Summary
we were registering plugin twice in some precompile logic which was redundant.

Does this PR introduce a breaking change?
no

Other information

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #183 (d994567) into master (a0237cc) will decrease coverage by 1.87%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #183      +/-   ##
==========================================
- Coverage   88.54%   86.66%   -1.88%     
==========================================
  Files           3        3              
  Lines         192      180      -12     
  Branches       39       38       -1     
==========================================
- Hits          170      156      -14     
- Misses         20       22       +2     
  Partials        2        2              
Impacted Files Coverage Δ
src/plugin.js 78.94% <ø> (-5.15%) ⬇️

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 a0237cc...d994567. Read the comment docs.


this.preCompiler = webpack(config);
this.preCompiler.outputFileSystem = createFsFromVolume(new Volume());
this.preCompiler.outputFileSystem.join = path.join.bind(path);
Copy link
Member

Choose a reason for hiding this comment

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

We should keep it otherwise webpack serve will not work

Copy link
Member Author

Choose a reason for hiding this comment

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

can you clarify(maybe I misunderstood), how will webpack serve get affected?

Copy link
Member

Choose a reason for hiding this comment

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

When we use webpack server we use memory memory fs so install packages will not work

Copy link
Member Author

Choose a reason for hiding this comment

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

but this is unused for some reason 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Because we don't have test with webpack-dev-server, we need to add them

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