Skip to content

How to change output filename of runtime chunk? #5358

Closed
@march08

Description

@march08

currently the output is runtime~xxx.[hash].js

How do I change that? I can't make it work on cloudfront to serve files with ~ in the filename...

Example:
S3: https://s3.eu-central-1.amazonaws.com/timesheet-app.topmonks.com/static/js/runtime~main.229c360f.js Works
CF: https://timesheet-app.topmonks.com/static/js/runtime~main.229c360f.js doesn't work

Thanks a lot

Edit:
Proposed changes:

webpack.prod InlineChunkHtmlPlugin

new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/])

webpack.prod runtimeChunk

runtimeChunk: { 
    name: entrypoint => `runtime-${entrypoint.name}`,
},

Edit: seems like the cloudfront link somehow works now, anyway I would perform the change anyway as imo ~ is not the best idea for file naming.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions