ES 服务
在模块与 esbuild 一起构建后运行的 esbuild 插件 。 这个项目将找到从 esbuild 输出中创建后要运行的输出模块, 或者它可以运行指定的 main 文档.
安装
无
npm install --save-dev @es-exec/esbuild-plugin-serve
线条
yarn add --dev @es-exec/esbuild-plugin-serve
使用量
import serve from '@es-exec/esbuild-plugin-serve';
/** @type import('@es-exec/esbuild-plugin-serve').ESServeOptions */
const options = {
main: 'build/index.mjs' // The module to run after the project is built. If not specified, will run the build outputs.
};
export default {
..., // Other esbuild config options.
plugins: [serve(options)],
};