Skip to content

Commit

Permalink
Remove some watcher hacks and update version (vercel#31768)
Browse files Browse the repository at this point in the history
## 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 `yarn lint`
  • Loading branch information
sokra authored Nov 25, 2021
1 parent 1bc9b1a commit 03ecbcf
Show file tree
Hide file tree
Showing 7 changed files with 104,019 additions and 104,032 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ jobs:
- run: npm i -g [email protected] && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: node run-tests.js --type development
name: Run test/development
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
Expand Down Expand Up @@ -214,10 +210,6 @@ jobs:
- run: npm i -g [email protected] && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: node run-tests.js --type production
name: Run test/production
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
Expand Down Expand Up @@ -261,10 +253,6 @@ jobs:
- run: npm i -g [email protected] && npx playwright install-deps
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: xvfb-run node run-tests.js --timings -g ${{ matrix.group }}/6
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

Expand Down Expand Up @@ -300,10 +288,6 @@ jobs:
name: next-swc-dev-binary
path: packages/next-swc/native

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

- run: cd test/integration/with-electron/app && yarn
if: ${{needs.build.outputs.docsChange != 'docs only change'}}

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test_react_experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
path: ./*
key: ${{ github.sha }}-react-experimental

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- run: npm i -g [email protected] && npx playwright install-deps

- run: node run-tests.js --timings -g ${{ matrix.group }}/6
3 changes: 0 additions & 3 deletions .github/workflows/test_react_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
path: ./*
key: ${{ github.sha }}-react-next

# TODO: remove after we fix watchpack watching too much
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- run: npm i -g [email protected] && npx playwright install-deps

- run: node run-tests.js --timings -g ${{ matrix.group }}/6
18 changes: 6 additions & 12 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ import { getRawPageExtensions } from './utils'
import browserslist from 'browserslist'
import loadJsConfig from './load-jsconfig'

const watchOptions = Object.freeze({
aggregateTimeout: 5,
ignored: ['**/.git/**', '**/node_modules/**', '**/.next/**'],
})

function getSupportedBrowsers(
dir: string,
isDevelopment: boolean
Expand Down Expand Up @@ -941,8 +946,6 @@ export default async function getBaseWebpackConfig(
// Default behavior: bundle the code!
}

const emacsLockfilePattern = '**/.#*'

const codeCondition = {
test: /\.(tsx|ts|js|cjs|mjs|jsx)$/,
...(config.experimental.externalDir
Expand Down Expand Up @@ -1095,16 +1098,7 @@ export default async function getBaseWebpackConfig(
...entrypoints,
}
},
watchOptions: {
aggregateTimeout: 5,
ignored: [
'**/.git/**',
'**/node_modules/**',
'**/.next/**',
// can be removed after https://github.com/paulmillr/chokidar/issues/955 is released
emacsLockfilePattern,
],
},
watchOptions,
output: {
// we must set publicPath to an empty value to override the default of
// auto which doesn't work in IE11
Expand Down
Loading

0 comments on commit 03ecbcf

Please sign in to comment.