addImport(importString)

Adds import to js file. Accepts code with imports and automatically merges file imports with provided imports.

Parameters

importString
string
required

Full import line, e.g. import { useEffect } from "react".