diff --git a/.changeset/purple-candles-decide.md b/.changeset/purple-candles-decide.md new file mode 100644 index 0000000..eb726ab --- /dev/null +++ b/.changeset/purple-candles-decide.md @@ -0,0 +1,5 @@ +--- +"vite-plugin-eslint4b": patch +--- + +fix: add path.parse() shim diff --git a/shim/path-shim.mjs b/shim/path-shim.mjs index a94af4d..9d1540d 100644 --- a/shim/path-shim.mjs +++ b/shim/path-shim.mjs @@ -34,6 +34,19 @@ export function join(...args) { return args.join("/"); } +export function parse(s) { + const dir = dirname(s); + const ext = extname(s); + const base = basename(s); + return { + root: "", + dir, + base, + ext, + name: basename(ext, ext), + }; +} + export const sep = "/"; export const posix = {