question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

How to change output filename of runtime chunk?

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
Timercommented, Oct 8, 2018

This is probably a bad default name, we should replace the ~ with something else.

1reaction
yordiscommented, Oct 11, 2018

I think we should replace it with - instead of ~.

@Timer we are embedded šŸ˜¢

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack - output.filename impacted by output.chunkFilename?
chunkFilename setting. So having these rules: optimization: { runtimeChunk: 'single', }, output: { path: outDir, filename: '[name]Ā ...
Read more >
Output - webpack
This option determines the name of non-initial chunk files. See output.filename option for details on the possible values. Note that these filenames need...
Read more >
Output - webpack 3 documentation
This option determines the name of non-entry chunk files. See output.filename option for details on the possible values. Note that these filenames need...
Read more >
What is Output ā€” Webpack 5 - DEV Community ā€ ā€
module.exports = { output: { path: path.resolve(__dirname, "dist"), filename: ... the bundle when placeholder value for any chunk changes.
Read more >
Adding Hashes to Filenames - SurviveJS
const config = { output: { path: PATHS.build, filename: "[name]. ... If the file contents related to a chunk are different, the hash...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found