Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore: add enable sourcemap flag (#3716)

白熱daf71684d465
diff --git a/common/shared/vite/index.js b/common/shared/vite/index.js
index 518f923ac0..1dc00d32cf 100644
--- a/common/shared/vite/index.js
+++ b/common/shared/vite/index.js
@@ -73,9 +73,6 @@ function createViteConfig(overrideConfig, /** @type {IOptions} */ options) {
entryRoot: 'src',
outDir: 'lib/types',
}),
- ...(
- pkg.name.startsWith('@univerjs/') ? [] : [obfuscator()]
- ),
buildPkg(),
],
define: {
@@ -118,6 +115,14 @@ function createViteConfig(overrideConfig, /** @type {IOptions} */ options) {
},
};
+ if (process.env.APP_TYPE === 'staging') {
+ originalConfig.build.sourcemap = true;
+ }
+
+ if (pkg.name.startsWith('@univerjs/')) {
+ originalConfig.plugins.push(obfuscator());
+ }
+
if (features) {
if (features.react) {
originalConfig.plugins.push(react());
diff --git a/packages-experimental/rpc-node/package.json b/packages-experimental/rpc-node/package.json
index fcea144e83..a31a0bc789 100644
--- a/packages-experimental/rpc-node/package.json
+++ b/packages-experimental/rpc-node/package.json
@@ -64,15 +64,27 @@
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/rpc": "workspace:*",
- "rxjs": ">=7.0.0"
+ "rxjs": "^7.8.1"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/rpc": "workspace:*",
- "rxjs": "^7.8.1",
- "typescript": "^5.5.4",
- "vite": "^5.4.1",
- "vitest": "^2.0.5"
+ "typescript": "^5.6.3",
+ "vite": "^5.4.8",
+ "vitest": "^2.1.2"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 21b7ce0a66..fc88594702 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -673,20 +673,20 @@ importers:
specifier: workspace:*
version: link:../../packages/rpc
rxjs:
- specifier: '>=7.0.0'
+ specifier: ^7.8.1
version: 7.8.1
devDependencies:
'@univerjs-infra/shared':
specifier: workspace:*
version: link:../../common/shared
typescript:
- specifier: ^5.5.4
+ specifier: ^5.6.3
version: 5.6.3
vite:
- specifier: ^5.4.1
+ specifier: ^5.4.8
vitest:
- specifier: ^2.0.5
+ specifier: ^2.1.2
packages-experimental/uni-docs-ui: