diff options
Diffstat (limited to 'webui/config/jest/fileTransform.js')
-rw-r--r-- | webui/config/jest/fileTransform.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webui/config/jest/fileTransform.js b/webui/config/jest/fileTransform.js new file mode 100644 index 0000000..927eb30 --- /dev/null +++ b/webui/config/jest/fileTransform.js @@ -0,0 +1,10 @@ +const path = require('path'); + +// This is a custom Jest transformer turning file imports into filenames. +// http://facebook.github.io/jest/docs/tutorial-webpack.html + +module.exports = { + process(src, filename) { + return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';'; + }, +}; |