Skip to content

fix: transpile imported modules#51

Merged
kentcdodds merged 2 commits into
kentcdodds:masterfrom
marzelin:fix-transpile-imported-modules
Mar 4, 2018
Merged

fix: transpile imported modules#51
kentcdodds merged 2 commits into
kentcdodds:masterfrom
marzelin:fix-transpile-imported-modules

Conversation

@marzelin

@marzelin marzelin commented Mar 4, 2018

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Mar 4, 2018

Copy link
Copy Markdown

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.

@kentcdodds kentcdodds left a comment

Copy link
Copy Markdown
Owner

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