File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
packages/next-intl/src/plugin Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,24 @@ function runOnce(fn: () => void) {
1414export default function createMessagesDeclaration (
1515 messagesPaths : Array < string >
1616) {
17- const shouldRun = [
18- 'dev' ,
19- 'build' ,
20- 'typegen'
21- // Note: The 'lint' task doesn't consult the
22- // Next.js config, so we can't detect it here.
23- ] . some ( ( arg ) => process . argv . includes ( arg ) ) ;
17+ // Instead of running _only_ in certain cases, it's
18+ // safer to _avoid_ running for certain known cases.
19+ // https://github.com/amannn/next-intl/issues/2006
20+ const shouldBailOut = [
21+ 'info' ,
22+ 'start'
2423
25- if ( ! shouldRun ) {
24+ // Note: These commands don't consult the
25+ // Next.js config, so we can't detect them here.
26+ // - telemetry
27+ // - lint
28+ //
29+ // What remains are:
30+ // - dev
31+ // - build
32+ // - typegen
33+ ] . some ( ( arg ) => process . argv . includes ( arg ) ) ;
34+ if ( shouldBailOut ) {
2635 return ;
2736 }
2837
You can’t perform that action at this time.
0 commit comments