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.

Cannot specify output chunk names

See original GitHub issue

Version

3.0.0-beta.6

Reproduction link

sanchitgn/chunk

Steps to reproduce

  1. Specify a chunk using dynamic import syntax
  2. Add a chunk name import(/* webpackChunkName: "profile" */ "./views/Profile/Profile.vue")
  3. Build yarn run build

What is expected?

   File                                      Size             Gzipped

  dist/js/profile.e9349658.js               31.66 kb         5.56 kb

What is actually happening?

 File                                      Size             Gzipped

  dist/js/0.e9349658.js                     31.66 kb         5.56 kb

Sorry if this is has already been posted. Could not find a similar issue. The other webpack comments (webpackMode) work fine

Possible duplicate #1097

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

15reactions
LinusBorgcommented, Apr 25, 2018

I think this line is the problematic one:

https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/config/prod.js#L8

Please try this in vue.config.js (can’t do that myelf right now):

module.exports {
  chainWebpack: config => {
    config.output.chunkFilename(`js/[name].[id].[chunkhash:8].js`)

  }
}

If that solves the problem, we should change ths with a PR.

4reactions
doublemarkedcommented, May 9, 2018

This doesn’t work if you’re building as lib or wc, because the lib/wc config is applied after the vue.config.js.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 5 {output: chunkFilename} not working
In my webpack config, I use single-file entry & the splitChunks option to separate the game code from the libraries I am using....
Read more >
Under The Hood - webpack
By default, there is no name for non-initial chunks so that a unique ID is used instead of a name. When using dynamic...
Read more >
15 Common Problems with rmarkdown (and some solutions)
Change the chunk name of one of them! 15.4 “Not what I ordered”: Objects not created in the right order. What it might...
Read more >
2.6 R code chunks and inline R code | R Markdown - Bookdown
For example, you can choose hide text output via the chunk option results ... of chunk options in knitr documented at https://yihui.name/knitr/options.
Read more >
Code Chunks: Comparing Sweave and Knitr
... the output is included, and so forth, can be specified after the chunk's name. ... 1. echo: if TRUE, the R code...
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