Skip to content
Discussion options

You must be logged in to vote

I was configuring babel's plugins and presets through its javascript API, and the cwd option had not been set correctly. The correct code ended up being:

// lib/index.js
const result = await babel.transform(file, {
  cwd: resolve(__dirname, '..'), // .. escapes from lib
  // ...
}

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@conartist6
Comment options

@conartist6
Comment options

@conartist6
Comment options

@conartist6
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by conartist6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant