rollup-plugin-local-resolve
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -21,4 +21,10 @@ import { statSync } from 'fs'; | ||
// TODO: This should be asynchronous | ||
var stats = statSync(dirIndexFile); | ||
var stats = undefined; | ||
try { | ||
stats = statSync(dirIndexFile); | ||
} catch (e) { | ||
return null; | ||
} | ||
if (stats.isFile()) { | ||
@@ -25,0 +31,0 @@ return dirIndexFile; |
@@ -25,4 +25,10 @@ 'use strict'; | ||
// TODO: This should be asynchronous | ||
var stats = fs.statSync(dirIndexFile); | ||
var stats = undefined; | ||
try { | ||
stats = fs.statSync(dirIndexFile); | ||
} catch (e) { | ||
return null; | ||
} | ||
if (stats.isFile()) { | ||
@@ -29,0 +35,0 @@ return dirIndexFile; |
{ | ||
"name": "rollup-plugin-local-resolve", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Resolves index.js files with Rollup", | ||
@@ -5,0 +5,0 @@ "main": "dist/rollup-plugin-local-resolve.js", |
@@ -14,3 +14,3 @@ # rollup-plugin-local-resolve | ||
## Usage | ||
``` | ||
```javascript | ||
import { rollup } from 'rollup'; | ||
@@ -17,0 +17,0 @@ import localResolve from 'rollup-plugin-local-resolve'; |
@@ -21,4 +21,10 @@ import { statSync } from 'fs'; | ||
// TODO: This should be asynchronous | ||
const stats = statSync(dirIndexFile); | ||
let stats; | ||
try { | ||
stats = statSync(dirIndexFile); | ||
} catch (e) { | ||
return null; | ||
} | ||
if (stats.isFile()) { | ||
@@ -25,0 +31,0 @@ return dirIndexFile; |
6389
86