Skip to content

Commit 24f573f

Browse files
chore: make sure polyfills are built for pnpm dev (vercel#40335)
Utilize `turbo` for `dev`, and make sure polyfills are built. Fixes vercel#40334 Another option would be to document that an initial `pnpm build` is necessary in [`CONTRIBUTING.md`](https://github.com/vercel/next.js/blob/canary/contributing.md#developing). ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
1 parent 73b4739 commit 24f573f

File tree

6 files changed

+24
-17
lines changed

6 files changed

+24
-17
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"clean": "pnpm lerna clean -y && pnpm lerna bootstrap && pnpm lerna exec 'rm -rf ./dist'",
1212
"build": "turbo run build",
1313
"lerna": "lerna",
14-
"dev": "lerna run dev --stream --parallel",
14+
"dev": "turbo run dev --parallel",
1515
"test-types": "pnpm tsc",
1616
"test-unit": "pnpm jest test/unit/",
1717
"test-dev": "cross-env NEXT_TEST_MODE=dev pnpm testheadless",
@@ -23,7 +23,7 @@
2323
"genstats": "cross-env LOCAL_STATS=true node .github/actions/next-stats-action/src/index.js",
2424
"git-reset": "git reset --hard HEAD",
2525
"git-clean": "git clean -d -x -e node_modules -e packages -f",
26-
"lint-typescript": "lerna run typescript",
26+
"lint-typescript": "turbo run typescript",
2727
"lint-eslint": "eslint . --ext js,jsx,ts,tsx --max-warnings=0 --config .eslintrc.json --no-eslintrc",
2828
"lint-no-typescript": "run-p prettier-check lint-eslint",
2929
"lint": "run-p test-types lint-typescript prettier-check lint-eslint lint-language",

packages/next-polyfill-module/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"scripts": {
1212
"build": "microbundle -i src/index.js -o dist/polyfill-module.js -f iife --no-sourcemap --external none --no-pkg-main",
13+
"dev": "pnpm build",
1314
"prepublishOnly": "cd ../../ && turbo run build"
1415
},
1516
"devDependencies": {

packages/next-polyfill-nomodule/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"scripts": {
1212
"build": "microbundle -i src/index.js -o dist/polyfill-nomodule.js -f iife --no-sourcemap --external none --no-pkg-main",
13+
"dev": "pnpm build",
1314
"prepublishOnly": "cd ../../ && turbo run build"
1415
},
1516
"devDependencies": {

packages/next/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@
120120
"@hapi/accept": "5.0.2",
121121
"@napi-rs/cli": "2.7.0",
122122
"@napi-rs/triples": "1.1.0",
123-
"@next/polyfill-module": "12.3.2-canary.15",
124-
"@next/polyfill-nomodule": "12.3.2-canary.15",
125-
"@next/react-dev-overlay": "12.3.2-canary.15",
126-
"@next/react-refresh-utils": "12.3.2-canary.15",
127-
"@next/swc": "12.3.2-canary.15",
123+
"@next/polyfill-module": "workspace:*",
124+
"@next/polyfill-nomodule": "workspace:*",
125+
"@next/react-dev-overlay": "workspace:*",
126+
"@next/react-refresh-utils": "workspace:*",
127+
"@next/swc": "workspace:*",
128128
"@segment/ajv-human-errors": "2.1.2",
129129
"@taskr/clear": "1.1.0",
130130
"@taskr/esnext": "1.1.0",

pnpm-lock.yaml

+8-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://turborepo.org/schema.json",
23
"pipeline": {
34
"build-native": {
45
"dependsOn": ["^build-native"],
@@ -15,6 +16,11 @@
1516
"build": {
1617
"dependsOn": ["^build"],
1718
"outputs": ["dist/**"]
18-
}
19+
},
20+
"dev": {
21+
"dependsOn": ["^dev"],
22+
"outputs": ["dist/**"]
23+
},
24+
"typescript": {}
1925
}
2026
}

0 commit comments

Comments
 (0)