mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Pass local paths to transformers
Summary: Pass `localPath` to transformers to allow usage of plugins like `transform-react-jsx-source` that don’t conflict with x-machine caches, e.g. Buck or our own global cache. These caches don’t work properly if paths local to a specific machine are part of cached outputs. Reviewed By: jeanlauliac Differential Revision: D5044147 fbshipit-source-id: 1177afb48d6dd9351738fcd4da8f9f6357e25e81
This commit is contained in:
committed by
Facebook Github Bot
parent
143beaf95d
commit
2fbe3b799e
@@ -72,6 +72,7 @@ function transformModule(
|
||||
Object.keys(variants).forEach(name => {
|
||||
tasks[name] = asyncify(() => transformer.transform({
|
||||
filename,
|
||||
localPath: filename,
|
||||
options: {...defaultTransformOptions, ...variants[name]},
|
||||
src: code,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user