Skip to content

Commit

Permalink
* Make sure test is red with original code
Browse files Browse the repository at this point in the history
* Add test description
* Describe better in the TODO comment what the ultimate intention is
  • Loading branch information
lukastaegert committed Oct 20, 2019
1 parent 65a01fe commit d9421ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/utils/FileEmitter.ts
Expand Up @@ -48,10 +48,8 @@ function generateAssetFileName(
}

function reserveFileNameInBundle(fileName: string, bundle: OutputBundleWithPlaceholders) {
if (fileName in bundle) {
// FIXME this should return error(errFileNameConflict(fileName));
// but until #3174 is fixed, this raises spurious errors and is disabled
}
// TODO this should warn if the fileName is already in the bundle,
// but until #3174 is fixed, this raises spurious warnings and is disabled
bundle[fileName] = FILE_PLACEHOLDER;
}

Expand Down
3 changes: 3 additions & 0 deletions test/chunking-form/samples/emit-same-file/_config.js
@@ -1,10 +1,13 @@
module.exports = {
description:
'does not throw an error if multiple files with the same name are emitted (until #3174 is fixed)',
options: {
input: 'main.js',
plugins: [
{
generateBundle() {
this.emitFile({ type: 'asset', fileName: 'myfile', source: 'abc' });
this.emitFile({ type: 'asset', fileName: 'myfile', source: 'abc' });
}
}
]
Expand Down

0 comments on commit d9421ef

Please sign in to comment.