We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling getBundles should only return a specific chunk once.
getBundles
Using the build in example, getBundles returns:
Bundles: { js: [ { file: 'index.js', hash: '8f79901c42dd94f639f2', publicPath: '/dist/index.js' }, { file: 'header.chunk.js', hash: '65a54ba3e1a237af26f6', publicPath: '/dist/header.chunk.js' }, { file: 'content.chunk.js', hash: 'ff806ccb9f861560a980', publicPath: '/dist/content.chunk.js' }, { file: 'content-nested.chunk.js', hash: 'ea831f89529ab7fd0acd', publicPath: '/dist/content-nested.chunk.js' }, { file: 'multilevel.chunk.js', hash: '397037a9c96fb38bce9c', publicPath: '/dist/multilevel.chunk.js' }, { file: 'shared-multilevel.chunk.js', hash: '7e0c20e6d0612b573cf5', publicPath: '/dist/shared-multilevel.chunk.js' }, { file: 'shared-multilevel.chunk.js', hash: '7e0c20e6d0612b573cf5', publicPath: '/dist/shared-multilevel.chunk.js' }, { file: 'deeplevel.chunk.js', hash: 'd10a8161e8b0e381d8c4', publicPath: '/dist/deeplevel.chunk.js' }, { file: 'shared-multilevel.chunk.js', hash: '7e0c20e6d0612b573cf5', publicPath: '/dist/shared-multilevel.chunk.js' }, { file: 'shared-multilevel.chunk.js', hash: '7e0c20e6d0612b573cf5', publicPath: '/dist/shared-multilevel.chunk.js' } ] }
You can see shared-multilevel.chunk.js is included multiple times.
shared-multilevel.chunk.js
This results in duplicate entries when outputting the script tag:
<script src="/dist/index.js"></script> <script src="/dist/header.chunk.js"></script> <script src="/dist/content.chunk.js"></script> <script src="/dist/content-nested.chunk.js"></script> <script src="/dist/multilevel.chunk.js"></script> <script src="/dist/shared-multilevel.chunk.js"></script> <script src="/dist/shared-multilevel.chunk.js"></script> <script src="/dist/deeplevel.chunk.js"></script> <script src="/dist/shared-multilevel.chunk.js"></script> <script src="/dist/shared-multilevel.chunk.js"></script>
I guess you need to check if the file already exists before adding into that file type's array?
Run the example, inspect the source
Apologies this looks like an unforeseen side effect of my suggested fix for #5!
The text was updated successfully, but these errors were encountered:
I'm already working on this issue 😄
Sorry, something went wrong.
b234a89
themgoncalves
No branches or pull requests
Expected Behavior
Calling
getBundles
should only return a specific chunk once.Current Behavior
Using the build in example,
getBundles
returns:You can see
shared-multilevel.chunk.js
is included multiple times.This results in duplicate entries when outputting the script tag:
Possible Solution
I guess you need to check if the file already exists before adding into that file type's array?
Steps to Reproduce
Run the example, inspect the source
Other Comments
Apologies this looks like an unforeseen side effect of my suggested fix for #5!
The text was updated successfully, but these errors were encountered: