diff --git a/apps/wallet/build/main.build.ts b/apps/wallet/build/main.build.ts index b7ccc95f0..be01f72e7 100644 --- a/apps/wallet/build/main.build.ts +++ b/apps/wallet/build/main.build.ts @@ -72,6 +72,13 @@ export default defineConfig(_ => { const folder = dirname(id); const isNodeModule = folder.includes('node_modules'); + if (isNodeModule && folder.includes('/@dfinity/didc')) { + // This ensures that the didc library is not included in the main ic libs chunk, + // this is because the didc library includes a wasm file that is loaded at runtime and + // makes the first load of the application slower. + return `ic-didc`; + } + if ( folder.includes('/src/locales') && SUPPORTED_LOCALES.some(locale => resolve(folder, `${locale}.locale.ts`) === id) diff --git a/apps/wallet/build/plugins/with-ic-assets.plugin.ts b/apps/wallet/build/plugins/with-ic-assets.plugin.ts index 4a4431405..32ace051b 100644 --- a/apps/wallet/build/plugins/with-ic-assets.plugin.ts +++ b/apps/wallet/build/plugins/with-ic-assets.plugin.ts @@ -10,7 +10,7 @@ const getContentSecurityPolicy = ( ): string => { const csp: Record = { 'default-src': ["'none'"], - 'script-src': ["'self'"], + 'script-src': ["'self'", "'wasm-unsafe-eval'"], 'connect-src': ["'self'", 'https://icp-api.io', 'https://ic0.app', 'https://icp0.io'], 'img-src': ["'self'", 'data:'], 'font-src': ["'self'"], diff --git a/apps/wallet/src/components/PageLayout.vue b/apps/wallet/src/components/PageLayout.vue index 147b7d585..74cc21a05 100644 --- a/apps/wallet/src/components/PageLayout.vue +++ b/apps/wallet/src/components/PageLayout.vue @@ -77,17 +77,17 @@