Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not load files with file name 'er' #4068

Open
lhbvita opened this issue Feb 10, 2025 · 2 comments
Open

can not load files with file name 'er' #4068

lhbvita opened this issue Feb 10, 2025 · 2 comments

Comments

@lhbvita
Copy link

lhbvita commented Feb 10, 2025

i use angular17 and i have some files with filename startwith 'er', e.g. er-page.module.ts or er.json. when i use esbuild with nameChuncks:true, i can not load these files, error 404.
my routing is

{
       path: SERVICE_PATH.ER,
       children: [
           {
               data: { preload: true },
               path: 'er',
               loadChildren: () => import('./pages/er-page/er-page.module').then(m => m.ErPageModule)
           },
           {
               data: { preload: true },
               path: 'iot',
               loadChildren: () => import('./pages/iot-page/iot-page.module').then(m => m.IotPageModule),
           }
       ],
       resolve: [UserServiceResolver, VpcConfigResolver, ErConfigResolver, NPSEndpointIdResolver],
       canActivateChild: [GuardService, NonSupportGuard]
   }

the build output file name is er-page.module-ZKPN5Y5Z.js and iot-page.module-SETEPPCX.js

Image

Image

but the browser can not load er-page.module-ZKPN5Y5Z.js ,while iot-page.module-SETEPPCX.js is ok

Image

Image

When i change the file path to import('./pages/er-page/Er-page.module').then(m => m.ErPageModule), the issue is ok

Image

Image

and i try other changes, like following:

  • import('./pages/er-page/er-page.module').then(m => m.QrPageModule) no

  • import('./pages/er-page/qr-page.module').then(m => m.ErPageModule) ok

  • import('./pages/er-page/qr-page.module').then(m => m.QrPageModule) ok

  • import('./pages/er-page/ere-page.module').then(m => m.ErPageModule) no

  • import('./pages/er-page/ere-page.module').then(m => m.QrPageModule) no

  • import('./pages/er-page/ereq-page.module').then(m => m.ErPageModule) no

  • import('./pages/er-page/qer-page.module').then(m => m.ErPageModule) ok

  • import('./pages/er-page/qere-page.module').then(m => m.ErPageModule) ok

  • import('./pages/er-page/erq-page.module').then(m => m.ErPageModule) no

i wonder is 'er' special?

@evanw
Copy link
Owner

evanw commented Feb 10, 2025

This is a very strange issue, and this is probably something you have to debug for yourself. That said, I did notice one thing, which could be a problem or might just be a typo:

When i change the file path to import('./pages/er-page/Er-page.module').then(m => m.ErPageModule), the issue is ok

This is the only thing you posted with a capital E: Er instead of er. Is that the problem?

In any case, marking this issue as unactionable because it doesn't have enough information.

@lhbvita
Copy link
Author

lhbvita commented Feb 11, 2025

is ebuild generate bundle file name with its path, right? like ./pages/er-page/er-page.module --> er-page.module-[hash].js.
but as i posted what changes of path I have tried, it seems as long as the path startwith smallcase 'er', this issue occurs.
source includes iot-page.module, but not er-page.module
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants