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.

module.id is incremented when add a new page

See original GitHub issue

Version

3.0.0-rc.5

Reproduction link

https://github.com/PanJiaChen/chunk-test

Steps to reproduce

  1. npm install
  2. add a new router (Don’t add at the end)
  3. npm run build
  4. diff generated files

What is expected?

I only added one file, so the final result should not change other pages.xxx.js.

What is actually happening?

About.vue js file id has been changed. Caused the file moduleId behind it to change.

image

Every time I add a new page, it may cause the cache of other pages to become invalid.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
PanJiaChencommented, Jul 25, 2018

Before the official release of webpack5, I found that NamedChunksPlugin can be used to solve this problem.

new webpack.NamedChunksPlugin(chunk => {
  if (chunk.name) {
    return chunk.name
  }
  return Array.from(chunk.modulesIterable, m => m.id).join('_')
})
1reaction
PanJiaChencommented, Jul 23, 2018

webpack records can solved this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto Increment for Custom Module ID's - Stack Overflow
Yes, the system should automatically generate the ID. I'd try to create the custom class again, maybe something went wrong during the setup....
Read more >
create table with id auto increment when install module - Drupal
Hello every body, i am creating a module emailupdate. when install module i want to create table with id auto increment.
Read more >
How do we auto increment our title and name fields?
So what I want to do is make the title and name for each child page an automatically incrementing number when you create...
Read more >
How do you auto increment an "ID" field for every opportunity ...
We are trying to create a field in Opportunities that automatically assigns an auto-increment value to each new Opportunity. This is with an...
Read more >
MySQL Tutorial :: 7.9 Using AUTO_INCREMENT
The AUTO_INCREMENT attribute can be used to generate a unique identity for new rows: CREATE TABLE animals ( id MEDIUMINT NOT NULL AUTO_INCREMENT, ......
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