import-sync
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"files": [ | ||
@@ -10,0 +10,0 @@ "dist" |
@@ -63,3 +63,3 @@ <div align="center"> | ||
- [2. Usage](#2-usage) | ||
- [2.1. relativePath](#21-relativepath) | ||
- [2.1. id](#21-id) | ||
- [2.2. options](#22-options) | ||
@@ -85,3 +85,3 @@ - [2.3. return](#23-return) | ||
``` | ||
importSync(relativePath, options); | ||
importSync(id, options); | ||
``` | ||
@@ -97,3 +97,3 @@ | ||
```javascript | ||
const { someVariable, someFunction } = importSync('some-module'); | ||
const { someVariable, someFunction } = importSync('./some-module'); | ||
``` | ||
@@ -111,3 +111,3 @@ | ||
const { someFunction } = importSync( | ||
'someModule', | ||
'./someModule', | ||
{ basePath: process.cwd() } | ||
@@ -121,3 +121,3 @@ ); | ||
const { someFunction } = importSync( | ||
'someModule', | ||
'./someModule', | ||
{ | ||
@@ -135,2 +135,8 @@ esmOptions: { | ||
Importing an ESM-only module | ||
```javascript | ||
const fetch = importSync('node-fetch'), | ||
``` | ||
</details> | ||
@@ -137,0 +143,0 @@ |
30989
321