sindresorhus

import-from

Import a module like with `require()` but from a given path

by sindresorhus

JavaScript

JavaScript90.9%
TypeScript9.1%

Commit activity

Last 12 weeks · 1 commit

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · 1 discussion · Last activity 1mo ago
See all on GitHub →
MSE99
ESM supportOpenIssue

Feature request I'm currently working on a tool that uses to invoke node module look up inside different directories, i need es modules support in the future and would really appreciate, it being implemented in this package, thanks.

MSE99 · 2y ago
tjx666

cwd: /Users/yutengjing/code/fe-test find module: found: /Users/yutengjing/code/fe-test/node_modules/.pnpm/typescript@3.9.7/node_modules/typescript/lib/typescript.js expect: /Users/yutengjing/code/fe-test/node_modules/typescript/lib/typescript.js

tjx666 · 4y ago
sindresorhus

Added module.createRequireFromPath(filename). This new method can be used to create a custom require function that will resolve modules relative to the filename path. #19360 \- https://nodejs.org/en/blog/release/v10.12.0/

sindresorhus · 5y ago
Structured data for AI agents

Repository: sindresorhus/import-from. Description: Import a module like with `require()` but from a given path Stars: 85, Forks: 8. Primary language: JavaScript. Languages: JavaScript (90.9%), TypeScript (9.1%). License: MIT. Latest release: v4.0.0 (5y ago). Open PRs: 0, open issues: 1. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, BendingBender, ranyitz, Richienb, SamVerschueren.