mirror of
				https://github.com/cinnyapp/cinny.git
				synced 2025-11-04 06:20:28 +03:00 
			
		
		
		
	Bump pdfjs-dist from 3.10.111 to 4.2.67 (#1717)
* Bump pdfjs-dist from 3.10.111 to 4.2.67 Bumps [pdfjs-dist](https://github.com/mozilla/pdfjs-dist) from 3.10.111 to 4.2.67. - [Commits](https://github.com/mozilla/pdfjs-dist/commits) --- updated-dependencies: - dependency-name: pdfjs-dist dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fix pdfjs top level await --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									8267990e6f
								
							
						
					
					
						commit
						565a6563e1
					
				
					 3 changed files with 290 additions and 35 deletions
				
			
		| 
						 | 
				
			
			@ -2,11 +2,12 @@ import { defineConfig } from 'vite';
 | 
			
		|||
import react from '@vitejs/plugin-react';
 | 
			
		||||
import { wasm } from '@rollup/plugin-wasm';
 | 
			
		||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
 | 
			
		||||
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
 | 
			
		||||
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
 | 
			
		||||
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
 | 
			
		||||
import inject from '@rollup/plugin-inject';
 | 
			
		||||
import { svgLoader } from './viteSvgLoader'
 | 
			
		||||
import buildConfig from "./build.config"
 | 
			
		||||
import topLevelAwait from 'vite-plugin-top-level-await';
 | 
			
		||||
import { svgLoader } from './viteSvgLoader';
 | 
			
		||||
import buildConfig from './build.config';
 | 
			
		||||
 | 
			
		||||
const copyFiles = {
 | 
			
		||||
  targets: [
 | 
			
		||||
| 
						 | 
				
			
			@ -35,7 +36,7 @@ const copyFiles = {
 | 
			
		|||
      dest: 'public/',
 | 
			
		||||
    },
 | 
			
		||||
  ],
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default defineConfig({
 | 
			
		||||
  appType: 'spa',
 | 
			
		||||
| 
						 | 
				
			
			@ -46,6 +47,12 @@ export default defineConfig({
 | 
			
		|||
    host: true,
 | 
			
		||||
  },
 | 
			
		||||
  plugins: [
 | 
			
		||||
    topLevelAwait({
 | 
			
		||||
      // The export name of top-level await promise for each chunk module
 | 
			
		||||
      promiseExportName: '__tla',
 | 
			
		||||
      // The function to generate import names of top-level await promise in each chunk module
 | 
			
		||||
      promiseImportName: (i) => `__tla_${i}`,
 | 
			
		||||
    }),
 | 
			
		||||
    viteStaticCopy(copyFiles),
 | 
			
		||||
    vanillaExtractPlugin(),
 | 
			
		||||
    svgLoader(),
 | 
			
		||||
| 
						 | 
				
			
			@ -54,26 +61,24 @@ export default defineConfig({
 | 
			
		|||
  ],
 | 
			
		||||
  optimizeDeps: {
 | 
			
		||||
    esbuildOptions: {
 | 
			
		||||
        define: {
 | 
			
		||||
          global: 'globalThis'
 | 
			
		||||
        },
 | 
			
		||||
        plugins: [
 | 
			
		||||
          // Enable esbuild polyfill plugins
 | 
			
		||||
          NodeGlobalsPolyfillPlugin({
 | 
			
		||||
            process: false,
 | 
			
		||||
            buffer: true,
 | 
			
		||||
          }),
 | 
			
		||||
        ]
 | 
			
		||||
    }
 | 
			
		||||
      define: {
 | 
			
		||||
        global: 'globalThis',
 | 
			
		||||
      },
 | 
			
		||||
      plugins: [
 | 
			
		||||
        // Enable esbuild polyfill plugins
 | 
			
		||||
        NodeGlobalsPolyfillPlugin({
 | 
			
		||||
          process: false,
 | 
			
		||||
          buffer: true,
 | 
			
		||||
        }),
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  build: {
 | 
			
		||||
    outDir: 'dist',
 | 
			
		||||
    sourcemap: true,
 | 
			
		||||
    copyPublicDir: false,
 | 
			
		||||
    rollupOptions: {
 | 
			
		||||
      plugins: [
 | 
			
		||||
        inject({ Buffer: ['buffer', 'Buffer'] })
 | 
			
		||||
      ]
 | 
			
		||||
    }
 | 
			
		||||
      plugins: [inject({ Buffer: ['buffer', 'Buffer'] })],
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue