1.1.0 • Published 3 months ago

@lvce-editor/import-script v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

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

1.1.0

3 months ago

1.0.0

3 months ago