mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Add support for "browser" condition (e.g., as used by Webpack) by stubbing-away Node imports (fixes #1441).
This commit is contained in:
parent
65eeb4c8d9
commit
a009407088
6 changed files with 45 additions and 32 deletions
|
|
@ -1,10 +1,8 @@
|
|||
// @ts-check
|
||||
|
||||
import * as nodeFs from "node:fs";
|
||||
import { createRequire } from "node:module";
|
||||
const dynamicRequire = createRequire(import.meta.url);
|
||||
import * as os from "node:os";
|
||||
import path from "node:path";
|
||||
// @ts-ignore
|
||||
import { fs as nodeFs, module, os, path } from "#node-imports";
|
||||
const dynamicRequire = module.createRequire(import.meta.url);
|
||||
import { initialize as cacheInitialize } from "./cache.mjs";
|
||||
import { version } from "./constants.mjs";
|
||||
import rules from "./rules.mjs";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue