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

@vitejs/plugin-legacy chunk name is't working with config? #11508

Closed
7 tasks done
richerfu opened this issue Dec 28, 2022 · 0 comments · Fixed by #11599
Closed
7 tasks done

@vitejs/plugin-legacy chunk name is't working with config? #11508

richerfu opened this issue Dec 28, 2022 · 0 comments · Fixed by #11599

Comments

@richerfu
Copy link

Describe the bug

legacy 's chunk files name can't been changed with rollupOptions.output.entryFileNames or rollupOptions.output.chunkFileNames

Reproduction

https://stackblitz.com/edit/vitejs-vite-gwsdqz?file=vite.config.ts&terminal=dev

Steps to reproduce

  1. npm run install
  2. npm run build

I think it shoule be test.[hash:10].js,but with -legacy.

// this config worked.
entryFileNames: 'test-[name].[hash:10].js'
// this config not work
entryFileNames: info => {
          if (info.name === 'polyfills') {
            return '[name].[hash:10].js';
          }
          return 'test.[hash:10].js';
}

图片

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    @vitejs/plugin-legacy: ^3.0.1 => 3.0.1 
    vite: ^4.0.0 => 4.0.3

Used Package Manager

npm

Logs

No response

Validations

wkstudy added a commit to wkstudy/vite that referenced this issue Jan 1, 2023
@sapphi-red sapphi-red linked a pull request Jan 6, 2023 that will close this issue
9 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants