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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
chore: add missing locale exports to package.json (#2315)
白熱95d61bde8525
diff --git a/common/shared/vite/build-locale.js b/common/shared/vite/build-locale.jsindex d4b8e51730..483de69f5f 100644--- a/common/shared/vite/build-locale.js+++ b/common/shared/vite/build-locale.js@@ -61,6 +61,24 @@ exports.buildLocale = function buildLocale({ entryRoot, outDir }) {// eslint-disable-next-line no-consoleconsole.log(`[vite:build-locale] ${outputPath} generated`);});++ // generate exports+ const pkg = require(`${process.cwd()}/package.json`);+ pkg.exports = {+ ...pkg.exports,+ './locale/*': './src/locale/*.ts',+ };+ pkg.publishConfig = {+ ...pkg.publishConfig,+ exports: {+ ...pkg.publishConfig.exports,+ './locale/*': './lib/locale/*.json',+ },+ };+ fs.writeFileSync(+ `${process.cwd()}/package.json`,+ `${JSON.stringify(pkg, null, 4)}\n`+ );},};};diff --git a/packages/sheets-find-replace/package.json b/packages/sheets-find-replace/package.jsonindex 257e6905ad..70e0d9bdfe 100644--- a/packages/sheets-find-replace/package.json+++ b/packages/sheets-find-replace/package.json@@ -22,6 +22,7 @@],"exports": {".": "./src/index.ts",+ "./locale/*": "./src/locale/*.ts","./*": "./src/*"},"main": "./lib/cjs/index.js",@@ -42,6 +43,7 @@"require": "./lib/cjs/*","types": "./lib/types/index.d.ts"},+ "./locale/*": "./lib/locale/*.json","./lib/*": "./lib/*"}},diff --git a/packages/slides/package.json b/packages/slides/package.jsonindex ad42d95d6f..ee46549508 100644--- a/packages/slides/package.json+++ b/packages/slides/package.json@@ -19,6 +19,7 @@},"exports": {".": "./src/index.ts",+ "./locale/*": "./src/locale/*.ts","./*": "./src/*"},"main": "./lib/cjs/index.js",@@ -39,6 +40,7 @@"require": "./lib/cjs/*","types": "./lib/types/index.d.ts"},+ "./locale/*": "./lib/locale/*.json","./lib/*": "./lib/*"}},