UniverJS events and methods missing after Angular production build (CellPointerDown, setNumberFormat, etc.) #5545
Replies: 1 comment
-
|
If you’re using Univer via the plugin mode, you’ll need to manually import the required facade package to access the corresponding facade APIs. For example, the import { FUniver } from '@univerjs/core/facade'
import '@univerjs/sheets-numfmt/facade'
// ...You can refer to the documentation here: https://docs.univer.ai/guides/sheets/getting-started/facade#integrating-facade-api-in-plugin-mode. Since the information you provided consists only of code snippets and not a fully functional minimal reproducible example, I cannot confidently determine the root cause of the issue. If you need further assistance, please follow the community guidelines to provide a minimal reproducible demo. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi UniverJS team,
First, thank you for this amazing library — it's very powerful and well-designed.
🔴 Problem
I’m developing an Angular application using UniverJS (v0.9.2) to provide Excel-like features. Everything works perfectly in development (localhost).
However, once I build the app for production, I lose access to some critical methods and event constants on the UniverJS API objects.
🟢 Expected Behavior
The available API objects and their properties (like
Event.CellPointerDownandrange.setNumberFormat) should be identical between development and production builds.❌ Actual Behavior
univerAPI.Eventloses many event properties in production (likeCellPointerDown,CellPointerMove, etc.)Calling
range.setNumberFormat(...)in production throws:This only happens in the production build, not during development.
Plugin Registration Code
Here is the code I use to initialize and register all the UniverJS plugins:
🛠️ Angular Build Configuration
Here’s the relevant part of my
angular.jsonused to prevent aggressive optimization:🟢 Development (full event list)
🔴 Production (missing events)
🙏 Request for Help
Has anyone experienced a similar issue when deploying an Angular app with UniverJS?
Any ideas on how to ensure that the required events and APIs are preserved in the production build?
Thank you very much in advance 🙌
Beta Was this translation helpful? Give feedback.
All reactions