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

plugin-legacy: polyfills chunk should respect output.entryFileNames option #4221

Closed
4 tasks done
portfolioris opened this issue Jul 12, 2021 · 5 comments · Fixed by #8247
Closed
4 tasks done

plugin-legacy: polyfills chunk should respect output.entryFileNames option #4221

portfolioris opened this issue Jul 12, 2021 · 5 comments · Fixed by #8247

Comments

@portfolioris
Copy link

Clear and concise description of the problem

As a developer I want to disable hashing of filenames, so I can always reference the same polyfill file.

Suggested solution

I would be nice if the plugin-legacy would follow the build.rollupOptions.output.entryFileNames option. In my case, I would like to add <script nomodule src="dist/assets/polyfills-legacy.js"></script> to my HTML.

I guess it would involve adding entryFileNames: buildOptions.rollupOptions.output.entryFileNames, to the output config of buildPolyfillChunk().

Alternative

No response

Additional context

No response

Validations

@hsuna
Copy link

hsuna commented Aug 20, 2021

Waiting for repair!

@keith0305
Copy link

keith0305 commented Aug 27, 2021

Hey, I have the same issue. I managed to remove all hashes in the output, except for polyfills-legacy js.

@vamsidotdev
Copy link

Same issue for me. Has anyone found a workaround for this?

@freesou2
Copy link

freesou2 commented Dec 6, 2021

same issue for me

@jheng-jie
Copy link

temporary plan

  • node_modules/@vitejs/plugin-legacy/index.js

  • find async function buildPolyfillChunk

const res = await build({
  build: {
    rollupOptions: {
      output: {
        entryFileNames: "[name].js",
      }
    }
  }
})

waiting for repair!

@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2022
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.

7 participants