aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
16.55k stars 582 forks source link

Duplicated module file extension in Next.js with turbopack #1092

Closed KBeDevel closed 2 months ago

KBeDevel commented 4 months ago

What version of million are you using?

3.1.11

Are you using an SSR adapter? If so, which one?

Vercel/Next.js@14.2.5

What package manager are you using?

bun

What operating system are you using?

Linux

What browser are you using?

Chrome, Firefox, Opera, Floorp, Vivaldi, Brave

Describe the Bug

Module extensions are duplicated when being called at compiling time (in dev mode)

One of the multiple errors: image

This occurs with every single 'use client' component when using turbopack and @million/lint > 1.0.0-rc.81 in dev mode.

When I use @million/lint@1.0.0-rc.81 and million@3.1.11 this issue disappears.

What's the expected result?

Resolve client modules without duplicated extension

Link to Minimal Reproducible Example

https://codesandbox.io/p/devbox/nextjs-million-lint-bug-d74985?file=%2Fnext.config.mjs%3A47%2C1

Participation

github-actions[bot] commented 4 months ago

Thanks for opening this issue! A maintainer will review it soon.

Yasamato commented 4 months ago

Reproducable starting in version @million/lint@1.0.0-rc.82 up to @million/lint@1.0.0-rc.84. With version @million/lint@1.0.0-rc.81 I do not get this error message

KBeDevel commented 4 months ago

Reproducable starting in version @million/lint@1.0.0-rc.82 up to @million/lint@1.0.0-rc.84. With version @million/lint@1.0.0-rc.81 I do not get this error message

You are right. I'll update the issue.

KBeDevel commented 2 months ago

Is there any maintainer to provide any guidelines to patch this issue?

Thank you in advance.

vadolasi commented 2 months ago

Same error here

KBeDevel commented 2 months ago

This error is still present in release 1.0.0.

aidenybai commented 2 months ago

@KBeDevel can you upgrade to next@canary? This was a bug on Next.js https://github.com/aidenybai/next-turbopack-loader-repro. If that doesn't work, please schedule a time https://cal.com/aiden

KBeDevel commented 2 months ago

@aidenybai Using next@15.0.0-canary.174 and @million/lint@1.0.0 on a clean project seems to work fine. Thank you for your time.

aidenybai commented 2 months ago

@KBeDevel Amazing!

dalessandro07 commented 2 weeks ago

I have the same error, next js version 15.0.3 and @million/lint version 1.0.12

topc01 commented 1 week ago

I have the same issue using next 15.0.4-canary.22