Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/guide/ide-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ You can also manually set up the IDE configuration to match your Vite+ setup:
</project>
```

Often, `.idea` folders are gitignored in a project, even the `externalDependencies.xml` file. Adding the `.idea/.gitignore` file with the following content will help ensure that it is present:
Often, `.idea` folders are gitignored in a project, even the `externalDependencies.xml` file, which is used to tell your IDE what plugins should be used for the workspace.

```gitignore [.idea/.gitignore]
!externalDependencies.xml
Please make sure to add this line to your main `.gitignore` file, to ensure that the file will be included:

```gitignore [.gitignore]
!.idea/externalDependencies.xml
```
6 changes: 0 additions & 6 deletions packages/cli/src/utils/__tests__/editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,9 +665,6 @@ describe('writeEditorConfigs', () => {
expect(oxfmtSettingsXml).toContain(
'<option name="preferOxfmtCodeStyleSettings" value="true" />',
);

const gitignore = fs.readFileSync(path.join(projectRoot, '.idea', '.gitignore'), 'utf8');
expect(gitignore).toBe('**\n!externalDependencies.xml\n');
});

it('writes workspace.xml with the resolved package manager', async () => {
Expand Down Expand Up @@ -709,8 +706,5 @@ describe('writeEditorConfigs', () => {
'utf8',
);
expect(oxfmtSettingsXml).toContain('<component name="OxfmtSettings">');

const gitignore = fs.readFileSync(path.join(projectRoot, '.idea', '.gitignore'), 'utf8');
expect(gitignore).toBe('**\n!externalDependencies.xml\n');
});
});
5 changes: 0 additions & 5 deletions packages/cli/src/utils/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ const JETBRAINS_OXFMT_SETTINGS = `<?xml version="1.0" encoding="UTF-8"?>
</project>
`;

const JETBRAINS_GITIGNORE_ADDITION = `**
!externalDependencies.xml
`;

type EditorConfigValue = Record<string, unknown> | string;

export const EDITORS = [
Expand Down Expand Up @@ -163,7 +159,6 @@ export const EDITORS = [
// Placeholder; writeEditorConfig() regenerates this with the resolved package manager.
'workspace.xml': jetbrainsWorkspaceConfig(PackageManager.pnpm),
'OxfmtSettings.xml': JETBRAINS_OXFMT_SETTINGS,
'.gitignore': JETBRAINS_GITIGNORE_ADDITION,
},
},
] as const;
Expand Down
Loading