@lvce-editor/import-script
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

import-script

Dynamically import a module with helpful error messages in case the import fails.

Install

npm install @lvce-editor/import-script

Usage

import { importScript } from '@lvce-editor/importScript'

const otherFunction = () => {
  throw new Error(`oops`)
}

const module = await import('./not-found.js')

//
//

Gitpod

Open in Gitpod

Readme

Keywords

Package Sidebar

Install

npm i @lvce-editor/import-script

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

11.8 kB

Total Files

5

Last publish

Collaborators

  • levivilet