8000 fix: renaming generated files to allow several vue files in a folder · fuse-box/fuse-box@fcfbfa0 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit fcfbfa0

Browse files
eddownchanged
authored andcommitted
fix: renaming generated files to allow several vue files in a folder
1 parent 0d3dbc2 commit fcfbfa0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/vue/VuePlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export class Vu 6FCC eComponentClass implements Plugin {
5151

5252
private createVirtualFile(file: File, block: any, scopeId: string, pluginChain: Plugin[]): VueBlockFile {
5353
let extension = block.lang || this.getDefaultExtension(block);
54-
let src = `./${block.type}.${extension}`;
54+
let name = file.relativePath.split('/').pop();
55+
let src = `./${name}.${extension}`;
5556

5657
if (block.src) {
5758
let srcExtension = path.extname(block.src) || '';

0 commit comments

Comments
 (0)
0