Skip to content

Commit 67a5904

Browse files
committed
add webpack tests
1 parent c48c301 commit 67a5904

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

dev-packages/e2e-tests/test-applications/nextjs-16/package.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
"build": "next build > .tmp_build_stdout 2> .tmp_build_stderr || (cat .tmp_build_stdout && cat .tmp_build_stderr && exit 1)",
88
"clean": "npx rimraf node_modules pnpm-lock.yaml .tmp_dev_server_logs",
99
"dev:webpack": "next dev --webpack",
10-
"build:webpack": "next build --webpack",
10+
"build-webpack": "next build --webpack > .tmp_build_stdout 2> .tmp_build_stderr || (cat .tmp_build_stdout && cat .tmp_build_stderr && exit 1)",
1111
"start": "next start",
1212
"lint": "eslint",
1313
"test:prod": "TEST_ENV=production playwright test",
1414
"test:dev": "TEST_ENV=development playwright test",
15+
"test:dev-webpack": "TEST_ENV=development-webpack playwright test",
1516
"test:build": "pnpm install && pnpm build",
1617
"test:build-canary": "pnpm install && pnpm add next@canary && pnpm build",
17-
"test:assert": "pnpm test:prod && pnpm test:dev"
18+
"test:build-canary-webpack": "pnpm install && pnpm add next@canary && pnpm build:webpack",
19+
"test:assert": "pnpm test:prod && pnpm test:dev",
20+
"test:assert-webpack": "pnpm test:prod && pnpm test:dev-webpack"
1821
},
1922
"dependencies": {
2023
"@sentry/nextjs": "latest || *",
@@ -40,11 +43,23 @@
4043
"extends": "../../package.json"
4144
},
4245
"sentryTest": {
46+
"variants": [
47+
{
48+
"build-command": "pnpm test:build-webpack",
49+
"label": "nextjs-16 (webpack)",
50+
"assert-command": "pnpm test:assert-webpack"
51+
}
52+
],
4353
"optionalVariants": [
4454
{
4555
"build-command": "pnpm test:build-canary",
46-
"label": "nextjs-16 (canary)",
56+
"label": "nextjs-16 (canary, turbopack)",
4757
"assert-command": "pnpm test:assert"
58+
},
59+
{
60+
"build-command": "pnpm test:build-canary-webpack",
61+
"label": "nextjs-16 (canary, webpack)",
62+
"assert-command": "pnpm test:assert-webpack"
4863
}
4964
]
5065
}

dev-packages/e2e-tests/test-applications/nextjs-16/playwright.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ if (!testEnv) {
66
}
77

88
const getStartCommand = () => {
9+
if (testEnv === 'development-webpack') {
10+
return 'pnpm next dev -p 3030 --webpack 2>&1 | tee .tmp_dev_server_logs';
11+
}
12+
913
if (testEnv === 'development') {
1014
return 'pnpm next dev -p 3030 2>&1 | tee .tmp_dev_server_logs';
1115
}

0 commit comments

Comments
 (0)