@build-script/heft-plugin-entry
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

locally load heft plugin

  • if js file exists: load it
  • else: load ts file using ts-node

Useful when developing/testing heft plugin it self. ts-node is a dev-dependency, so only tiny overhead when published to npm.

usage:

import { loadPlugin } from '@build-script/heft-plugin-entry';
import { resolve } from 'path';

module.exports = loadPlugin({
	projectRoot: resolve(__dirname, '..'),
	distEntry: 'lib/plugin.js',
	sourceEntry: 'src/plugin.ts',
});

Readme

Keywords

none

Package Sidebar

Install

npm i @build-script/heft-plugin-entry

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

8.84 kB

Total Files

13

Last publish

Collaborators

  • gongt