vite-plugin-resolve
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -1,3 +0,3 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
module.exports = function resolve(resolves = {}, options = {}) { | ||
export default function resolve(resolves = {}, options = {}) { | ||
let { dir = '.vite-plugin-resolve' } = options; | ||
@@ -10,0 +10,0 @@ let root = process.cwd(); |
{ | ||
"name": "vite-plugin-resolve", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "Custom resolve module content.", | ||
@@ -18,3 +18,7 @@ "main": "index.js", | ||
"vite-plugin-resolve" | ||
] | ||
], | ||
"type": "module", | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
} | ||
} |
@@ -38,4 +38,4 @@ # vite-plugin-resolve [![NPM version](https://img.shields.io/npm/v/vite-plugin-resolve.svg)](https://npmjs.org/package/vite-plugin-resolve) [![awesome-vite](https://awesome.re/badge.svg)](https://github.com/vitejs/awesome-vite) | ||
resolve({ | ||
// Supported nested module id | ||
// Supported return Promise | ||
// Support nested module id | ||
// Support return Promise | ||
'@scope/name': async () => await require('fs').promises.readFile('path', 'utf-8'), | ||
@@ -70,3 +70,3 @@ }) | ||
async execa(args) { | ||
// Build execa as an CommonJs module | ||
// Transpile execa as an CommonJs module | ||
await build({ | ||
@@ -73,0 +73,0 @@ plugins: [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
12315
1
Yes