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

Introduce a new option for workers chunks' filenames #17002

Open
gretzkiy opened this issue Apr 16, 2023 · 4 comments
Open

Introduce a new option for workers chunks' filenames #17002

gretzkiy opened this issue Apr 16, 2023 · 4 comments

Comments

@gretzkiy
Copy link

Feature request

The source of this feature request is this discussion. The aim is to specify the filename for worker chunks only. Currently, there is no straightforward way to determine whether the chunk being processed in chunkFilename is a worker. Therefore, the request is for an option similar to workerPublicPath, but only for the worker chunk's filename, such as workerChunkFilename.

During the aforementioned discussion, @alexander-akait suggested identifying worker chunks by checking if chunkLoading === 'import-scripts' in pathData?.chunk?._groups within the chunkFilename function. However, this approach is considered hacky and not very robust.

@TheLarkInn
Copy link
Member

So my understanding is that the output.workerPublicPath feature is not enough?

@alexander-akait
Copy link
Member

@TheLarkInn No, it only set public path for workers, but sometimes you need another location for workers than dist, right now you can implement this using chunkFilename: (pathData) => { /* ... */ }, but it is really hard to undestand when chunk is worker's chunks when not, so it is more like about user experience

@TheLarkInn TheLarkInn moved this from Backlog to Priority - Low in webpack 5/6 Apr 18, 2023
@webpack-bot
Copy link
Contributor

This issue had no activity for at least three months.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@webpack-bot
Copy link
Contributor

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

@github-project-automation github-project-automation bot moved this from Priority - Low to Ready for Merge in webpack 5/6 Aug 1, 2023
@alexander-akait alexander-akait moved this from Ready for Merge to Priority - Low in webpack 5/6 Aug 7, 2023
@github-project-automation github-project-automation bot moved this from Priority - Low to Ready for Merge in webpack 5/6 Nov 22, 2023
@alexander-akait alexander-akait moved this from Ready for Merge to Priority - Low in webpack 5/6 Dec 19, 2023
@alexander-akait alexander-akait moved this from Priority - Low to Priority - Medium in webpack 5/6 Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Priority - Medium
Development

No branches or pull requests

4 participants