diff --git a/vite.config.js b/vite.config.js index 5c1c68a2..a5af94d8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -14,9 +14,9 @@ import buildConfig from './build.config'; const copyFiles = { targets: [ { - src: 'node_modules/@element-hq/element-call-embedded/dist', - dest: 'element-call' - }, + src: 'node_modules/@element-hq/element-call-embedded/dist/*', + dest: 'public/element-call', + }, { src: 'node_modules/pdfjs-dist/build/pdf.worker.min.mjs', dest: '', @@ -51,7 +51,10 @@ function serverMatrixSdkCryptoWasm(wasmFilePath) { configureServer(server) { server.middlewares.use((req, res, next) => { if (req.url === wasmFilePath) { - const resolvedPath = path.join(path.resolve(), "/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm"); + const resolvedPath = path.join( + path.resolve(), + '/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm' + ); if (fs.existsSync(resolvedPath)) { res.setHeader('Content-Type', 'application/wasm'); @@ -106,8 +109,8 @@ export default defineConfig({ }, devOptions: { enabled: true, - type: 'module' - } + type: 'module', + }, }), ], optimizeDeps: {