Skip to content

Commit

Permalink
exclude .stories. and .test. files from taskfile watch and error …
Browse files Browse the repository at this point in the history
…plugin (vercel#74064)

### Why?

1. Errors from `.stories.` are added to `errors.json`.
2. `pnpm dev -F next` watches unit test files and stories changes, which is unnecessary.
  • Loading branch information
devjiwonchoi authored Dec 18, 2024
1 parent 1856294 commit 9cc7976
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next/taskfile-swc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (task) {
if (file.base.endsWith('.d.ts') || file.base.endsWith('.json')) return

const plugins = [
...(file.base.includes('.test.')
...(file.base.includes('.test.') || file.base.includes('.stories.')
? []
: [[path.join(__dirname, 'next_error_code_swc_plugin.wasm'), {}]]),
]
Expand Down
2 changes: 1 addition & 1 deletion packages/next/taskfile-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = function (Taskr, _utils) {
const wp = new Watchpack({
aggregateTimeout: 5,
followSymlinks: true,
ignored: '**/.git',
ignored: ['**/.git', '**/*.test.*', '**/*.stories.*'],
})

names = toArr(names)
Expand Down

0 comments on commit 9cc7976

Please sign in to comment.