diff --git a/src/index.ts b/src/index.ts index 2139a4c..87c431b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -31,10 +31,15 @@ export const unpluginFactory: UnpluginFactory = (options = vite: { apply: 'serve', async configureServer() { + if (options.disableLaunchEditor) + return + startServer(mergedOptions.port) }, }, webpack(compiler) { + if (options.disableLaunchEditor) + return if (compiler.options.mode === 'development') { compiler.hooks.done.tap(PLUGIN_NAME, async () => { startServer(mergedOptions.port) @@ -42,6 +47,8 @@ export const unpluginFactory: UnpluginFactory = (options = } }, rspack(compiler) { + if (options.disableLaunchEditor) + return if (compiler.options.mode === 'development') { compiler.hooks.done.tap(PLUGIN_NAME, async () => { startServer(mergedOptions.port)