• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

relative-require

Injects module require statements with the correct relative require path
  • #javascript
  • #relative
  • #require
  • #import
  • #module
stuart-williams
1.6.12 475
4
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

Relative Require Build Status Stories in Ready

Injects module require statements with the correct relative require path

Usage

Drag & drop from the tree view

Demo

Right click from the tree view

Demo

Using the hotkey ctrl-alt-r

Demo

Right click in the editor

Demo

Features

  • Import project modules with correct relative path
  • Import from your projects package.json dependencies
  • Import native node modules; fs, path etc.
  • Infers the import statement syntax (require or import) from the active file contents
  • Drag and drop from tree view
  • Right click a file in the tree view to import

Configuration

Option Defaults Description
Omit File Extensions "js", "jsx" Omit the extension from the require path for these file types
Exclude Directories "^\.", "node_modules", "bower_components" Exclude these directories from the module search

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by