question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generated imports are changing the order on build / next dev

See original GitHub issue

The order of these 2 import swaps when I run next dev and next build image

It causes unnecessary changes visible in git repo - is there a way to prevent it?

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tatethurstoncommented, Nov 20, 2022

@Rashair I’m not able to reproduce this with a minimal project starter, the imports are unchanged across next dev and next build: https://stackblitz.com/edit/nextjs-yzc5rj?file=nextjs-routes.d.ts.

Could you share a repo that reproduces this?

0reactions
tatethurstoncommented, Nov 22, 2022

Ah that makes sense, thanks for reporting back. Hopefully Rider has an ignore list you can add autogenerated files like nextjs-routes.d.ts to? Alternatively if there are comment ignore directives for Rider I’d be curious what they use.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Features: Next.js Compiler
Learn about the Next.js Compiler, written in Rust, which transforms and minifies your Next.js application.
Read more >
Error: Must use import to load ES Module · Issue #25454
cjs, change the requiring code to use import(), or remove "type": "module" from C:\Users\bucsa\dev\atomic\node_modules\konva\package.json. The ...
Read more >
Best practices to increase the speed for Next.js apps
In this case, use the depcheck package to find unused dependencies in your project (this package is included with npm). I recommend that...
Read more >
How To Optimize Your Next.js Production Build
1. Run the following command to add this package. npm install @next/bundle-analyzer cross-env 2. Next Bundle Analyzer works with the next build command....
Read more >
Next.js Global CSS cannot be imported from files other than ...
Use the built-in Next.js CSS loader (see here) instead of legacy @zeit/next-sass . Replace @zeit/next-sass package with sass .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found