Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rewrite-imports

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rewrite-imports - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

2

package.json
{
"name": "rewrite-imports",
"version": "1.3.1",
"version": "1.3.2",
"repository": "lukeed/rewrite-imports",

@@ -5,0 +5,0 @@ "description": "Rewrite `import` statements as `require()`s; via RegExp",

# rewrite-imports [![Build Status](https://travis-ci.org/lukeed/rewrite-imports.svg?branch=master)](https://travis-ci.org/lukeed/rewrite-imports)
> Rewrite `import` statements as `require()`s; via RegExp
Transforms various `import` statements into ES5-compatible `require()` calls, using regular expressions.
Quickly transforms various `import` statements into ES5-compatible `require()` statements.
## Caveats
> **Note:** This module returns a String and **does not** provide a runtime nor does it evaluate the output.
* Returns a string and **does not** provide a runtime nor does it evaluate the output.
> :bulb: For this behavior, visit [`rewrite-module`](https://github.com/lukeed/rewrite-module) or check out [`@taskr/esnext`](https://github.com/lukeed/taskr/tree/master/packages/esnext) for an example!
> :bulb: For this behavior, use [`rewrite-module`](https://github.com/lukeed/rewrite-module) or check out [`@taskr/esnext`](https://github.com/lukeed/taskr/tree/master/packages/esnext) for an example.
* Have [false positives](https://github.com/lukeed/rewrite-imports/issues/8), you may want to use an AST to find actual `import` statements before transformation.
> :bulb: Check out an [example implementation](https://github.com/styleguidist/react-styleguidist/blob/82f22d217044dee6215e60696c39791ee168fc14/src/client/utils/transpileImports.js).
## Install

@@ -12,0 +16,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc