parallax / jsPDF

Client-side JavaScript PDF generation for everyone.
https://parall.ax/products/jspdf
MIT License
28.53k stars 4.61k forks source link

Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds. #3723

Closed rohxty closed 1 month ago

rohxty commented 1 month ago

Working on the vue+vite+uniapp project,whe I build it . I got Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds. Here is my vite.congfig.ts build: { target: 'es2015', }, optimizeDeps: { include: ['lodash', 'dayjs'], }, plugins: [ Components({ dts: 'src/@types/components.d.ts', dirs: ['node_modules/@yingzi/yingzi-mp-design'], exclude: [], }), uni({ vueOptions: { reactivityTransform: path.resolve(__dirname, 'src'), }, viteLegacyOptions: { targets: ['defaults', 'android >= 6', 'ios >= 10'], }, }), ], I tried this config export default defineConfig({ build: { lib: { entry: resolve(__dirname, './src/core/derivedPDFfile.ts'), name: 'libs', fileName: (format) => libs.${format}.js, formats: ['es'], }, } }

but it did not work

B-Esmaili commented 1 month ago

Hi. Will there be a patch release for this any time soon? I am stuck with this issue in a project. Thanks.