jest-file-loader
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -11,4 +11,5 @@ const path = require('path'); | ||
return { | ||
process(src, filename, config, options) { | ||
const exportedPath = JSON.stringify(slash(path.relative(config.rootDir, filename))); | ||
process(src, filename, options) { | ||
const rootDir = options.rootDir || options.config.rootDir; | ||
const exportedPath = JSON.stringify(slash(path.relative(rootDir, filename))); | ||
@@ -15,0 +16,0 @@ return `${esModule ? 'export default' : 'module.exports ='} ${exportedPath};`; |
{ | ||
"name": "jest-file-loader", | ||
"description": "A jest transformer similar to webpack's file-loader", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
2341
18