mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
feat: improve test & bundler (#14434)
#### PR Dependency Tree * **PR #14434** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced rspack bundler as an alternative to webpack for optimized builds. * **Tests & Quality** * Added comprehensive editor semantic tests covering markdown, hotkeys, and slash-menu operations. * Expanded CI cross-browser testing to Chromium, Firefox, and WebKit; improved shape-rendering tests to account for zoom. * **Bug Fixes** * Corrected CSS overlay styling for development servers. * Fixed TypeScript typings for build tooling. * **Other** * Document duplication now produces consistent "(n)" suffixes. * French i18n completeness increased to 100%. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -21,11 +21,18 @@ export const productionCacheGroups = {
|
||||
asyncVendor: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name(module: any) {
|
||||
const modulePath =
|
||||
module?.nameForCondition?.() || module?.context || module?.resource;
|
||||
|
||||
if (!modulePath || typeof modulePath !== 'string') {
|
||||
return 'app-async';
|
||||
}
|
||||
|
||||
// monorepo linked in node_modules, so it's not a npm package
|
||||
if (!module.context.includes('node_modules')) {
|
||||
if (!modulePath.includes('node_modules')) {
|
||||
return `app-async`;
|
||||
}
|
||||
const name = module.context.match(
|
||||
const name = modulePath.match(
|
||||
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
|
||||
)?.[1];
|
||||
return `npm-async-${name}`;
|
||||
|
||||
Reference in New Issue
Block a user