electron / electron/forge

Warning about deprecated inlineDynamicImports when debugging in VS Code

Open Beginner friendly
#4,336 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 17m
Merged PRs (30d)
32

Description

### Pre-flight checklist

- [x] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Forge version

7.11.2

### Electron version

42.4.0

### Operating system

Windows 10

### Last known working Forge version

_No response_

### Expected behavior

No warnings when debugging through VS Code.

### Actual behavior

Warning observed after "Debugger attached." message:

```
WARN inlineDynamicImports option is deprecated, please use codeSplitting: false instead.
```

### Steps to reproduce

1. Create a new electron-forge project in VS Code.
2. Add a debug profile that executes this in Windows:
`${workspaceFolder}/../node_modules/@electron-forge/cli/script/vscode.cmd`
3. Debug the project.
4. Observe the Debug Console.

I can see `inlineDynamicImports: true` in the following two files:

* @electron-forge\plugin-vite\dist\config\vite.preload.config.js:18: `inlineDynamicImports: true,`
* @electron-forge\plugin-vite\src\config\vite.preload.config.ts:20: `inlineDynamicImports: true,`

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with @electron-forge/plugin-vite/src/config/vite.preload.config.ts and compare it with the generated dist/config/vite.preload.config.js. Reproduce the VS Code debugging flow using the Windows script and confirm the deprecated warning. Done means debugging a new Electron Forge project no longer reports the inlineDynamicImports deprecation warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript, vite, vscode
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.