https://github.com/lvce-editor/import-script
https://github.com/lvce-editor/import-script
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lvce-editor/import-script
- Owner: lvce-editor
- License: mit
- Created: 2024-03-16T10:00:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-16T10:49:04.000Z (about 1 year ago)
- Last Synced: 2025-01-11T01:53:45.391Z (4 months ago)
- Language: JavaScript
- Size: 59.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# import-script
Dynamically import a module with helpful error messages in case the import fails.
## Install
```sh
npm install @lvce-editor/import-script
```## Usage
```js
import { importScript } from '@lvce-editor/importScript'const otherFunction = () => {
throw new Error(`oops`)
}const module = await import('./not-found.js')
//
//
```## Gitpod
[](https://gitpod.io/#https://github.com/lvce-editor/import-script)