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: optimizing the build toolchain #1788

Merged
merged 6 commits into from
Oct 23, 2024
Merged

chore: optimizing the build toolchain #1788

merged 6 commits into from
Oct 23, 2024

Conversation

wang1212
Copy link
Member

@wang1212 wang1212 commented Oct 10, 2024

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / Document optimization
  • TypeScript definition update
  • Refactoring
  • Performance improvement
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

see #1781 , etc.

💡 Background and solution

Adjust the rollup code compilation tool chain to babel, because babel has more refined control over the code than typescript and can correctly handle dependent sourcemaps.

Fix the code formatting conflict between eslint and prettier, and also solve the problem that all configuration rules of eslint are not really effective.

In summary, the above measures fix the following issues:

  • Sourcemap can now be processed and generated correctly, and projects such as vite can parse correctly.
  • ESLint and prettier can now work together normally to uniformly format the code.
  • Support jumping directly from vscode to source code, and generate type files in real time during the dev process.

In addition, by introducing some rollup plug-ins, we prepare for subsequent engineering optimization.

@Aarebecca
Copy link
Contributor

lock 文件要不从仓库去掉?

@wang1212
Copy link
Member Author

wang1212 commented Oct 22, 2024

lock 文件要不从仓库去掉?

是遇到什么问题了么?

@lvisei
Copy link
Member

lvisei commented Oct 22, 2024

vite 的 sourcemap 没有生效是什么原因

@wang1212
Copy link
Member Author

vite 的 sourcemap 没有生效是什么原因

tsconfig 的配置不太对,以及 tsc 只支持处理包源码的 sourcemap,会直接忽略包依赖的 sourcemap,导致生成的 sourcemap 异常,除非将 src(或编译后的产物)也发布到 npm 才可以

@lvisei
Copy link
Member

lvisei commented Oct 22, 2024

tsconfig 的配置不太对,以及 tsc 只支持处理包源码的 sourcemap,会直接忽略包依赖的 sourcemap,导致生成的 sourcemap 异常,除非将 src(或编译后的产物)也发布到 npm 才可以

现在是把 src 发布到 npm 吗

@wang1212
Copy link
Member Author

tsconfig 的配置不太对,以及 tsc 只支持处理包源码的 sourcemap,会直接忽略包依赖的 sourcemap,导致生成的 sourcemap 异常,除非将 src(或编译后的产物)也发布到 npm 才可以

现在是把 src 发布到 npm 吗

没有,只会发布 dist 目录,即打包后的单文件,不发布编译 src(或编译后产生的 js 源代码)的目录

Base automatically changed from release to next October 22, 2024 12:40
packages/g-lite/src/css/parser/gradient.ts Dismissed Show dismissed Hide dismissed
packages/g-plugin-canvas-picker/src/Path.ts Dismissed Show dismissed Hide dismissed
rollup.config.mjs Fixed Show fixed Hide fixed
rollup.config.mjs Fixed Show fixed Hide fixed
rollup.config.mjs Fixed Show fixed Hide fixed
rollup.config.mjs Fixed Show fixed Hide fixed
rollup.config.mjs Fixed Show fixed Hide fixed
vite.config.mjs Dismissed Show dismissed Hide dismissed
rollup.config.mjs Dismissed Show dismissed Hide dismissed
@Aarebecca Aarebecca changed the base branch from next to release October 23, 2024 03:09
@Aarebecca Aarebecca merged commit 56abfb8 into release Oct 23, 2024
5 checks passed
@Aarebecca Aarebecca deleted the chore-toolchain branch October 23, 2024 03:12
wang1212 added a commit that referenced this pull request Oct 23, 2024
* chore: optimizing the build toolchain (#1788)

* chore: optimizing the build toolchain

* chore: dealing with legacy eslint rule issues

* chore: fix logic errors during refactoring

* chore: generate type files in real time during the dev

* chore: fix eslint issues

* chore: sync to next branch

* fix: fix angle value parse (#1796)

* fix: fix angle value parse

* chore: commit changeset

* perf: optimize large image rendering performance (#1798)

* Version Packages (#1799)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: 不如怀念(云谌) <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants