-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(rspack): add typeCheckOptions, runtimeDependencies, and cache options #33931
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
base: master
Are you sure you want to change the base?
Conversation
Added documentation for the mergeExternals option in NxAppWebpackPlugin.
…config.ts Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
# Conflicts: # docs/shared/packages/webpack/webpack-plugins.md # packages/webpack/src/plugins/nx-webpack-plugin/lib/apply-base-config.ts # packages/webpack/src/plugins/nx-webpack-plugin/nx-app-webpack-plugin-options.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👷 Deploy request for nx-docs pending review.Visit the deploys page to approve it
|
|
@davidantoon Can you update the deprecation method to mention: 1. what to use instead, 2. that the deprecated property will be removed in Nx 24 |
|
View your CI Pipeline Execution ↗ for commit 58b8dab
☁️ Nx Cloud last updated this comment at |
|
I've updated all deprecation messages for skipTypeChecking (and related typeCheck option) across the following files: Documentation
Webpack package
Rspack package
All deprecation messages now include:
|
packages/rspack/src/plugins/utils/plugins/generate-package-json-plugin.ts
Outdated
Show resolved
Hide resolved
Coly010
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes to parsing the package.json for the deps, in the chance that they are not being resolved from the root node_modules folder. (nested node_modules etc)
packages/rspack/src/plugins/utils/plugins/generate-package-json-plugin.ts
Show resolved
Hide resolved
based on pr code review comment, updated the rspack and webpack plugins json read to use readJsonFile from nx/devkit instead of standard fs, also using resolve instead of static readfile to support node_modules in project folder
@Coly010 DONE |
|
@leosvelperez can you please review and approve this PR |
Current Behavior
skipTypeCheckingoption is a simple boolean that only allows enabling/disabling type checkingruntimeDependenciesoption that webpack hascacheconfiguration is hardcoded and cannot be overridden by usersExpected Behavior
typeCheckOptionsoption allows configuring type checking with{ async: true }to run type checking in a separate process without blocking the buildskipTypeCheckingoption is maintained for backward compatibilityruntimeDependenciesoption for adding runtime dependencies to generatedpackage.json(useful for Docker installs)cacheoption allows users to override webpack/rspack caching behavior while maintaining backward-compatible defaultsRelated Issue(s)
N/A - Standalone feature
Changes Made
typeCheckOptions (webpack & rspack)
TypeCheckOptionsinterface withasyncpropertytypeCheckOptionsoption to plugin options interfacesapply-base-config.tsto normalizetypeCheckOptionsfrom deprecatedskipTypeCheckingfor backward compatibilityschema.jsonandschema.d.tsruntimeDependencies (webpack & rspack)
runtimeDependenciesoption toNxAppRspackPluginOptionsGeneratePackageJsonPluginto resolve and include runtime dependenciesschema.jsonandschema.d.tscache (webpack & rspack)
cacheoption to plugin options interfacesapply-base-config.tsto check'cache' in optionsbefore applying defaultscache: undefinedto force cache to be disabled{ type: 'memory' }for Node targets in watch modetruefor Node targets in watch mode,truein dependent configFiles Changed
Webpack:
packages/webpack/src/plugins/nx-webpack-plugin/nx-app-webpack-plugin-options.tspackages/webpack/src/plugins/nx-webpack-plugin/lib/apply-base-config.tspackages/webpack/src/executors/webpack/schema.jsonpackages/webpack/src/executors/webpack/schema.d.tspackages/webpack/src/plugins/generate-package-json-plugin.tsRspack:
packages/rspack/src/plugins/utils/models.tspackages/rspack/src/plugins/utils/apply-base-config.tspackages/rspack/src/plugins/utils/plugins/generate-package-json-plugin.tspackages/rspack/src/executors/rspack/schema.jsonpackages/rspack/src/executors/rspack/schema.d.tsDocumentation:
astro-docs/.../webpack/Guides/webpack-plugins.mdocpackages/webpack/docs/webpack-build-executor-examples.md