For better tooling support it's important to include absolute file name for JSX elements. However, having them inline will inflate resulting file size, so we move the file name to a constant declared at the beginning of the file and reference it from `__source` attribute.
6 lines
186 B
JavaScript
6 lines
186 B
JavaScript
var __jsxFileName = "/I/am/not/sure/how/to/get/path/to/test/fixtures/react-source/basic-sample/actual.js";
|
|
var x = <sometag __source={{
|
|
fileName: __jsxFileName,
|
|
lineNumber: 1
|
|
}} />;
|