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

feat(builder): support project references for source code build mode #4286

Conversation

targeral
Copy link
Member

@targeral targeral commented Jul 24, 2023

Summary

🤖 Generated by Copilot at 9438c1f

This pull request adds support for source code build mode for TypeScript projects with project references in the @modern-js/builder package. It also updates the integration tests and the changeset file for this feature.

Details

🤖 Generated by Copilot at 9438c1f

  • Add a changeset file to document the changes for the @changesets/cli tool (link)
  • Import a type definition from @modern-js/builder-webpack-provider to access the webpack builder plugin configuration (link)
  • Add a variable enableSourceBuild to check if the experiments.sourceBuild option is enabled in the builder configuration (link)
  • Add a conditional object to the ForkTsCheckerWebpackPlugin options to enable type checking for project references in source build mode (link)
  • Remove the output.disableTsChecker option from the app package configuration in the integration test for source code build, as it is no longer needed (link)
  • Fix a typo in the card entry point of the components package in the integration test for source code build, to point to the .d.ts file instead of the .ts file (link)

Related Issue

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2023

🦋 Changeset detected

Latest commit: 9438c1f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 217 packages
Name Type
@modern-js/builder Minor
@modern-js/doc-core Minor
@modern-js/plugin-storybook Minor
@modern-js/builder-cli Minor
@modern-js/builder-plugin-esbuild Minor
@modern-js/builder-plugin-node-polyfill Minor
@modern-js/builder-plugin-stylus Minor
@modern-js/builder-plugin-vue Minor
@modern-js/builder-plugin-vue2 Minor
@modern-js/app-tools Minor
@e2e/builder Minor
@modern-js/doc-plugin-api-docgen Minor
@modern-js/doc-plugin-preview Minor
@modern-js/doc-plugin-typedoc Minor
@modern-js/plugin-module-doc Minor
@modern-js/doc-tools Minor
@e2e/builder-cli-rspack Minor
@e2e/builder-cli-vue Minor
@e2e/builder-cli-webpack Minor
@modern-js/plugin-bff Minor
@modern-js/plugin-ssg Minor
@modern-js/plugin-swc Minor
@modern-js/plugin-tailwindcss Minor
@modern-js/plugin-garfish Minor
@modern-js/plugin-router-v5 Minor
@modern-js/runtime Minor
@modern-js/plugin-express Minor
@modern-js/plugin-koa Minor
@modern-js/plugin-polyfill Minor
@modern-js/plugin-server Minor
@modern-js/plugin-worker Minor
tests Minor
@integration-test/alias-set Minor
api-service-koa Minor
app-docmuent Minor
integration-asset-prefix Minor
async-entry-test Minor
bff-express Minor
bff-koa Minor
integration-builder-plugins Minor
builder-rspack Minor
integration-clean-dist-path Minor
integration-copy-assets Minor
antd-less Minor
bad-nested-npm-import Minor
bad-npm-import Minor
base-import Minor
disable-source-map Minor
exclude-less Minor
exclude-sass Minor
import-common-css Minor
less-import Minor
less-inline-js Minor
less-npm-import Minor
multi-css Minor
multi-less Minor
multi-sass Minor
nested-npm-import Minor
npm-import Minor
integration-tailwindcss-v2 Minor
integration-tailwindcss-v3 Minor
twin-macro-v2 Minor
twin-macro-v3 Minor
integration-custom-render Minor
integration-custom-template Minor
dev-server Minor
integration-disable-html Minor
legacy-esbuild-minify-js Minor
esbuild-transform-and-minify Minor
integration-config-async-config-test Minor
integration-basic-local-config Minor
integration-config-function-params Minor
integration-local-config-function Minor
main-entry-name Minor
tmp Minor
nonce Minor
routes Minor
file-based-router Minor
use-loader Minor
select-mul-entry-test Minor
select-one-entry-test Minor
server-config Minor
server-middleware Minor
server-hook-reqeust Minor
server-hook-response Minor
server-hook-router Minor
@integration-test/server-hook-reqeust Minor
server-prod Minor
@source-code-build/app-ts-loader Minor
@source-code-build/app Minor
ssg-fixtures-nested-routes Minor
ssg-fixtures-simple Minor
ssg-fixtures-web-server Minor
ssr-base-json-test Minor
ssr-base-test Minor
ssr-base-fallback-test Minor
init Minor
ssr-streaming-test Minor
swc-minify-css Minor
swc-minify-js Minor
transform-fail Minor
tmp-dir Minor
write-to-dist Minor
@e2e/garfish-dashboard-router-v6 Minor
@e2e/garfish-dashboard Minor
@e2e/garfish-main-router-v6 Minor
@e2e/garfish-main Minor
@e2e/garfish-table Minor
doc-plugin Minor
integration-module-doc Minor
@modern-js/builder-doc Minor
@modern-js/doc-tools-doc Minor
@modern-js/main-doc Minor
@modern-js/module-tools-docs Minor
simple-doc-template Minor
i18n-doc Minor
simple-doc-production Minor
with-base Minor
@modern-js/babel-preset-app Minor
@modern-js/babel-preset-base Minor
@modern-js/core Minor
@modern-js/doc-plugin-auto-sidebar Minor
@modern-js/doc-plugin-medium-zoom Minor
@modern-js/plugin-changeset Minor
@modern-js/plugin-data-loader Minor
@modern-js/plugin-i18n Minor
@modern-js/plugin-lint Minor
@modern-js/plugin-proxy Minor
@modern-js/plugin-testing Minor
@modern-js/new-action Minor
@modern-js-app/eslint-config Minor
@modern-js/eslint-config Minor
@modern-js/tsconfig Minor
@modern-js/babel-plugin-module-resolver Minor
@modern-js/bff-core Minor
@modern-js/bff-runtime Minor
@modern-js/server-core Minor
@modern-js/create-request Minor
@modern-js/prod-server Minor
@modern-js/server Minor
@modern-js/server-utils Minor
@modern-js/builder-rspack-provider Minor
@modern-js/builder-shared Minor
@modern-js/builder-webpack-provider Minor
@modern-js/friendly-errors-webpack-plugin Minor
@modern-js/builder-plugin-image-compress Minor
@modern-js/builder-plugin-swc Minor
@modern-js/plugin-module-babel Minor
@modern-js/plugin-module-banner Minor
@modern-js/plugin-module-import Minor
@modern-js/plugin-module-main-fields Minor
@modern-js/plugin-module-node-polyfill Minor
@modern-js/plugin-module-polyfill Minor
@modern-js/plugin-module-target Minor
@modern-js/module-tools Minor
@modern-js/monorepo-tools Minor
@modern-js/create Minor
@modern-js/e2e Minor
@modern-js/monorepo-utils Minor
@modern-js/node-bundle-require Minor
@modern-js/plugin Minor
@modern-js/remark-container Minor
@modern-js/types Minor
@modern-js/upgrade Minor
@modern-js/utils Minor
@modern-js/babel-compiler Minor
@scripts/build Minor
@scripts/check-changeset Minor
@scripts/jest-config Minor
@scripts/lint-package-json Minor
@scripts/prebundle Minor
@scripts/update-codesmith Minor
@scripts/vitest-config Minor
css-test Minor
doc-tools Minor
esbuild-integration Minor
integration-load-config Minor
runtime Minor
entry Minor
@source-code-build/components Minor
@source-code-build/utils Minor
ssg Minor
ssr Minor
swc-integration Minor
@e2e/webpack-builder-import-antd-v4 Minor
@e2e/webpack-builder-import-antd-v5 Minor
@e2e/webpack-builder-import-arco Minor
@e2e/webpack-builder-test-moment Minor
@e2e/builder-vue3 Minor
@e2e/builder-vue2 Minor
@e2e/garfish Minor
@modern-js/generator-common Patch
@modern-js/generator-plugin Patch
@modern-js/generator-utils Patch
@modern-js/bff-generator Patch
@modern-js/dependence-generator Patch
@modern-js/doc-generator Patch
@modern-js/entry-generator Patch
@modern-js/generator-generator Patch
@modern-js/module-generator Patch
@modern-js/module-test-generator Patch
@modern-js/monorepo-generator Patch
@modern-js/mwa-generator Patch
@modern-js/router-v5-generator Patch
@modern-js/rspack-generator Patch
@modern-js/ssg-generator Patch
@modern-js/storybook-generator Patch
@modern-js/test-generator Patch
@modern-js/upgrade-generator Patch
@modern-js/generator-plugin-plugin Patch
@modern-js/repo-generator Patch
@modern-js/generator-cases Patch
@modern-js/base-generator Patch
@modern-js/changeset-generator Patch
@modern-js/packages-generator Patch
@modern-js/server-generator Patch
@modern-js/tailwindcss-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Patch coverage has no change and project coverage change: -1.18 ⚠️

Comparison is base (99693f0) 57.59% compared to head (9438c1f) 56.42%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4286      +/-   ##
==========================================
- Coverage   57.59%   56.42%   -1.18%     
==========================================
  Files         672      663       -9     
  Lines       17794    18085     +291     
  Branches     3876     3950      +74     
==========================================
- Hits        10249    10204      -45     
- Misses       6934     7220     +286     
- Partials      611      661      +50     

see 386 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chenjiahan chenjiahan merged commit 7d966a1 into web-infra-dev:main Jul 25, 2023
10 checks passed
@caohuilin caohuilin mentioned this pull request Jul 26, 2023
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.

None yet

2 participants