Warning about deprecated inlineDynamicImports when debugging in VS Code

Open Beginner friendly
#4,336 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

Description

Pre-flight checklist
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • 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

Dominant language
TypeScript
Stars
7.1k
Forks
642
Avg merge
2d 8h
Merged PRs (30d)
35

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from electron/forge

All issues in electron/forge

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.