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

Export path to a js dep when it has no loader associated #1017

Conversation

pierredavidbelanger
Copy link
Contributor

This fixes the fact that an HTML dependency of a JS asset was wrongly written in the JS as an (not working) bundle loader that could make an app crash at runtime with a message like : Cannot find module '6'.

This is one of the two points (required to be able to do require('./other.html')) mentioned in this comment

@pierredavidbelanger
Copy link
Contributor Author

I am not sure I did this one correctly.

You can see this only as a proof that this problem can be fixed and to have a better view at it.
I guess someone with a better understanding of the codebase will be able to refactor my mess with something beautiful.

For now I, myself, see it as a good enough temporary fix ;)

@codecov-io
Copy link

Codecov Report

Merging #1017 into master will decrease coverage by 0.83%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1017      +/-   ##
==========================================
- Coverage   89.06%   88.22%   -0.84%     
==========================================
  Files          68       68              
  Lines        3438     3254     -184     
==========================================
- Hits         3062     2871     -191     
- Misses        376      383       +7
Impacted Files Coverage Δ
src/packagers/JSPackager.js 87.37% <0%> (-2.63%) ⬇️
src/transforms/posthtml.js 80.48% <0%> (-19.52%) ⬇️
src/assets/CSSAsset.js 81.73% <0%> (-8.7%) ⬇️
src/assets/ReasonAsset.js 91.66% <0%> (-8.34%) ⬇️
src/transforms/babel.js 87.37% <0%> (-6.8%) ⬇️
src/visitors/dependencies.js 80.51% <0%> (-6.5%) ⬇️
src/assets/GlobAsset.js 93.33% <0%> (-5.34%) ⬇️
src/utils/installPackage.js 61.9% <0%> (-3.18%) ⬇️
src/assets/HTMLAsset.js 85.1% <0%> (-2.13%) ⬇️
src/utils/getTargetEngines.js 95.5% <0%> (-1.13%) ⬇️
... and 12 more

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 c469751...9eda714. Read the comment docs.

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