Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove src/client from package #10703

Merged
merged 1 commit into from
Oct 29, 2022

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Oct 29, 2022

Description

These 12e0550, 294d8b4 commits added src/client to files field of package.json to include them in the package to avoid sourcemap errors.
But now dist/client/client.mjs.map has sourcesContent field so the real files in src/client is not needed.

I tested #3652's reproduction by upgrading Vite to 2.9.15 and manually removing src/client from the vite package.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added the p1-chore Doesn't change code behavior (priority) label Oct 29, 2022
@patak-dev patak-dev merged commit 0ee800f into vitejs:main Oct 29, 2022
pull bot pushed a commit to zhixiaoqiang/vite that referenced this pull request Oct 29, 2022
@sapphi-red sapphi-red deleted the chore/remove-src-client branch October 30, 2022 06:56
@silverwind
Copy link

The source map files in latest release still point to the removed files which causes warnings during dev for me:

Sourcemap for "node_modules/vite/dist/client/client.mjs" points to missing source files
Sourcemap for "node_modules/vite/dist/client/env.mjs" points to missing source files

Inspecting one of the sourcemap files shows the reference to nonexistant files:

{"version":3,"file":"client.mjs","sources":["../../src/client/overlay.ts","../../src/client/client.ts"]}

These warnings do not seem to reproduce using default config at least.

@patak-dev
Copy link
Member

@silverwind would you create a minimal reproduction to send a new issue so we can properly track this?

@silverwind
Copy link

Yes, if I find the config option that causes it.

@alamhubb
Copy link

alamhubb commented Nov 3, 2022

最新版本中的源映射文件仍然指向已删除的文件,这会在我的开发过程中引起警告:

Sourcemap for "node_modules/vite/dist/client/client.mjs" points to missing source files
Sourcemap for "node_modules/vite/dist/client/env.mjs" points to missing source files

检查其中一个源映射文件会显示对不存在文件的引用:

{"version":3,"file":"client.mjs","sources":["../../src/client/overlay.ts","../../src/client/client.ts"]}

至少使用默认配置似乎不会重现这些警告。

+1,I also encountered this problem ,

@adminoid
Copy link

+1 same issue... :-(

@patak-dev
Copy link
Member

Please create new issues with a minimal reproduction, dont comment on old PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants