You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to get file path of the input file being transformed inside transform callback? For my use case, I need to pass the path to babel's transformSync method.
newMergeIntoSingleFilePlugin({files: {"output.js": ["inputFile1","inputFile2","inputFile3"]},transform: {// Filepath is currently not passed to transform callback. This is just an example to demonstrate use case"output.js": (code,filePath)=>{babel.transformSync(code,{filename: filePath});}}})
For now, it is working for me just by specifying some random filePath, since babel is just using filePath for matching it against overrides. But I was wondering if others might have a similar usecase.
The text was updated successfully, but these errors were encountered:
Is it possible to get file path of the input file being transformed inside
transform
callback? For my use case, I need to pass the path to babel'stransformSync
method.For now, it is working for me just by specifying some random filePath, since babel is just using filePath for matching it against
overrides
. But I was wondering if others might have a similar usecase.The text was updated successfully, but these errors were encountered: