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.

Allow custom chunk names

See original GitHub issue

I’d like to be able to customize my chunk names so I can bundle similar pages into a single chunk. This is doable without the babel plugin, but it’s a little inelegant.

const LoginPage = universal(() => import(/* webpackChunkName: "app" */ 'components/pages/login'), { chunkName: 'app' })
const DashboardPage = universal(() => import(/* webpackChunkName: "app" */ 'components/pages/dashboard'), { chunkName: 'app' })

Thoughts?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
faceyspaceycommented, Sep 5, 2017

Search the code for the word “comment” and you will see how adding/removing comments is dealt with.

If u haven’t made a babel plugin before read james kyle’a guide. It’s not that hard. And u will come away feeling like a Jedi.

0reactions
faceyspaceycommented, Nov 28, 2017

doing some cleanup. gonna close this out as the PR references it. we’ll incorporate this stuff in the next major release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Naming chunks & custom naming function · Issue #346 - GitHub
What do you want to do with the named chunks? Named chunks are only useful for manually merging chunks by giving them the...
Read more >
How to name a webpack chunk (including split and common ...
If you just want to know how to name these common chunk bundles, scroll down to "Naming common chunks". Naming your entry file....
Read more >
How to correctly name the chunk group in Webpack?
As Webpack offers no in-built way to generate these, I wrote a very small Babel plugin to generate magic comment chunk names from...
Read more >
SplitChunksPlugin - webpack
Webpack will automatically split chunks based on these conditions: ... Providing a string or a function allows you to use a custom name....
Read more >
How to Use R Markdown Code Chunks - Earth Data Science
Let's break down code chunks in .Rmd files. Data Tip: You can add code output or an R object name to markdown segments...
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