Skip to content

Commit

Permalink
fix: 修复文件重命名多次重复插入问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Oct 25, 2022
1 parent 2dcffde commit 570af17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-autogeneration-import-file",
"version": "2.1.0",
"version": "2.1.1",
"description": "vite 自动生成 引入文件插件 支持vite2 、vite3 支持配合`unplugin-vue-components`自动引入组件/指令",
"type": "module",
"main": "dist/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function loadPathsPlugin(dirOptions: dirOptions) {
code.forEach((codeItem) => {
str = str.replace(codeItem.value, '');
});
loadFiles[index].slice(k, 1);
loadFiles[index].splice(k, 1);
changeFiles.push(val.fileName)
}
})
Expand Down

0 comments on commit 570af17

Please sign in to comment.