From 1dfa223476dc39650032bf73df49d9b76f1a4457 Mon Sep 17 00:00:00 2001 From: John Jenkins Date: Thu, 2 Apr 2026 17:00:47 +0100 Subject: [PATCH] fix: use `npx` to start stencil so it works in IDE plugins --- README.md | 2 +- src/create-config.ts | 2 +- src/test/create-config.spec.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f986ab8..38a9a6a 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,7 @@ Will result in: baseURL: 'http://localhost:3333', }, webServer: { - command: 'stencil build --dev --watch --serve --no-open', + command: 'npx stencil build --dev --watch --serve --no-open', url: 'http://localhost:3333/ping', reuseExistingServer: !process.env.CI, // Only timeout gets overridden, not the entire object diff --git a/src/create-config.ts b/src/create-config.ts index 3d9104b..ca205fc 100644 --- a/src/create-config.ts +++ b/src/create-config.ts @@ -49,7 +49,7 @@ export const createConfig = async ( baseURL, }, webServer: { - command: 'stencil build --dev --watch --serve --no-open --testing', + command: 'npx stencil build --dev --watch --serve --no-open --testing', url: webServerUrl, reuseExistingServer: !!!process.env.CI, // Max time to wait for dev server to start before aborting, defaults to 60000 (60 seconds) diff --git a/src/test/create-config.spec.ts b/src/test/create-config.spec.ts index d1b2cf8..cf4472e 100644 --- a/src/test/create-config.spec.ts +++ b/src/test/create-config.spec.ts @@ -22,7 +22,7 @@ describe('createConfig', () => { baseURL: 'http://localhost:3333', }, webServer: { - command: 'stencil build --dev --watch --serve --no-open --testing', + command: 'npx stencil build --dev --watch --serve --no-open --testing', cwd: undefined, url: 'http://localhost:3333/ping', reuseExistingServer: !process.env.CI, @@ -47,7 +47,7 @@ describe('createConfig', () => { baseURL: 'http://localhost:3333', }, webServer: { - command: 'stencil build --dev --watch --serve --no-open --testing', + command: 'npx stencil build --dev --watch --serve --no-open --testing', cwd: undefined, url: 'http://localhost:3333/ping', reuseExistingServer: !process.env.CI,