-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
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.
new MergeIntoSingleFilePlugin({
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.
Metadata
Metadata
Assignees
Labels
No labels