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: transpile imported modules #51

Merged

Conversation

marzelin
Copy link
Contributor

@marzelin marzelin commented Mar 4, 2018

Why:
closes #50

How:
registers babel before requiring a module

notes:
I've added a test for this but since babel-register pollutes global environment and could be required previously by some other tests i.e. when requiring a module with preval.require the test isn't fully reliable.

@marzelin marzelin changed the title Fix transpile imported modules fix: transpile imported modules Mar 4, 2018
@codecov
Copy link

codecov bot commented Mar 4, 2018

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #51   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines         101    102    +1     
  Branches       21     21           
=====================================
+ Hits          101    102    +1
Impacted Files Coverage Δ
src/get-replacement.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 36de84a...4a362db. Read the comment docs.

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Looks super. No worries on the test.

@kentcdodds kentcdodds merged commit b6eeba0 into kentcdodds:master Mar 4, 2018
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.

code transpilation is not performed for imported modules when prevaling with template literals
2 participants