-
Notifications
You must be signed in to change notification settings - Fork 366
fix: Add babel configuration for Playwright to handle TypeScript declare fields #5515
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: main
Are you sure you want to change the base?
Conversation
…are fields - Configure babel plugins for TypeScript with allowDeclareFields option - Add module resolver for @ alias to src directory - Create custom babel plugin to stub Vue/CSS imports - Add browser globals polyfill using happy-dom for Node.js context - Update playwright.i18n.config.ts with babel configuration This enables collect-i18n tests to run with proper TypeScript and module transformations.
🎭 Playwright Test Results✅ Tests completed successfully! ⏰ Completed at: 09/12/2025, 08:57:37 AM UTC 📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
… branches for locale updates
…lity - Renamed babel-plugin-stub-vue-imports.js to .cjs extension - Changed from ES module exports to CommonJS module.exports - Updated playwright.i18n.config.ts to use correct file path with __dirname - Added import.meta.url handling for ES module compatibility This fixes the module resolution errors when running pnpm collect-i18n
Summary
declare
fields@
aliasChanges
babel.config.json
with TypeScript preset configured withallowDeclareFields: true
babel-plugin-stub-vue-imports
to stub Vue and CSS importsscripts/setup-browser-globals.js
playwright.i18n.config.ts
with babel plugins configuration@babel/core
,@babel/preset-typescript
, etc.)Test plan
pnpm collect-i18n
- babel transformations now work correctlyRelated Issues
Fixes issues with
pnpm collect-i18n
failing due to TypeScript declare fields not being properly transformed by babel.🤖 Generated with Claude Code
┆Issue is synchronized with this Notion page by Unito