Skip to content
Prev Previous commit
Next Next commit
add start commands for dev mode
  • Loading branch information
chargome committed Oct 6, 2025
commit 2aa387750d89fbbbe3f79e4e4ea2995f31e9a2ab
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"clean": "npx rimraf node_modules pnpm-lock.yaml",
"test:prod": "TEST_ENV=production playwright test",
"test:dev": "TEST_ENV=development playwright test",
"test:dev-webpack": "TEST_ENV=development-webpack playwright test",
"test:build": "pnpm install && pnpm build",
"test:test-build": "pnpm ts-node --script-mode assert-build.ts",
"test:build-canary": "pnpm install && pnpm add next@canary && pnpm add react@latest && pnpm add react-dom@latest && pnpm build:webpack",
Expand Down Expand Up @@ -44,7 +45,8 @@
"optionalVariants": [
{
"build-command": "pnpm test:build-canary",
"label": "nextjs-app-dir (canary, webpack opt-in)"
"label": "nextjs-app-dir (canary, webpack opt-in)",
"assert-command": "pnpm test:prod && pnpm test:dev-webpack"
},
{
"build-command": "pnpm test:build-latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ if (!testEnv) {
throw new Error('No test env defined');
}

const getStartCommand = () => {
if (testEnv === 'development-webpack') {
return 'pnpm next dev -p 3030 --webpack';
}

return testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030';
Comment thread
chargome marked this conversation as resolved.
};

const config = getPlaywrightConfig({
startCommand: testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030',
startCommand: getStartCommand(),
port: 3030,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"clean": "npx rimraf node_modules pnpm-lock.yaml",
"test:prod": "TEST_ENV=production playwright test",
"test:dev": "TEST_ENV=development playwright test",
"test:dev-webpack": "TEST_ENV=development-webpack playwright test",
"test:build": "pnpm install && pnpm build",
"test:test-build": "pnpm ts-node --script-mode assert-build.ts",
"test:build-canary": "pnpm install && pnpm add next@canary && pnpm add react@latest && pnpm add react-dom@latest && pnpm build:webpack",
Expand Down Expand Up @@ -44,7 +45,8 @@
"optionalVariants": [
{
"build-command": "pnpm test:build-canary",
"label": "nextjs-pages-dir (canary, webpack opt-in)"
"label": "nextjs-pages-dir (canary, webpack opt-in)",
"assert-command": "pnpm test:prod && pnpm test:dev-webpack"
},
{
"build-command": "pnpm test:build-latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ if (!testEnv) {
throw new Error('No test env defined');
}

const getStartCommand = () => {
if (testEnv === 'development-webpack') {
return 'pnpm next dev -p 3030 --webpack';
}

return testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030';
};

const config = getPlaywrightConfig({
startCommand: testEnv === 'development' ? 'pnpm next dev -p 3030' : 'pnpm next start -p 3030',
startCommand: getStartCommand(),
port: 3030,
});

Expand Down
Loading