I’m using dynamic import for perhaps the first time and finding myself in the deep end of the build pool.
We are generating PDF reports using jspdf, which involves loading a large static font and images - something like 30 Mb of compiled JS blobs we don’t want to burden ourselves with on startup. To avoid this (and also avoid incompatibilities with fastboot), we’re dynamically loading our library that imports jspdf and the blobs and coordinates their use when the user requests the report. We get:
WARNING in ./node_modules/jspdf/dist/jspdf.umd.min.js 195:141-151
Critical dependency: the request of a dependency is an expression
@ ./node_modules/@ebiz/aditools-design-report/lib/src/pdf.js
@ C:/Users/rmack/AppData/Local/Temp/broccoli-12140X1sDlCgqiv9w/cache-576-bundler/staging/app.js
@ multi C:/Users/rmack/AppData/Local/Temp/broccoli-12140X1sDlCgqiv9w/cache-576-bundler/staging/l.js C:/Users/rmack/AppData/Local/Temp/broccoli-12140X1sDlCgqiv9w/cache-576-bundler/staging/app.js
WARNING in ./node_modules/jspdf/dist/jspdf.umd.min.js 195:240-254
Critical dependency: the request of a dependency is an expression
@ ./node_modules/@ebiz/aditools-design-report/lib/src/pdf.js
@ C:/Users/rmack/AppData/Local/Temp/broccoli-12140X1sDlCgqiv9w/cache-576-bundler/staging/app.js
and the chunk isn’t getting emitted. I think this has to do with its filters plugin which is computing AMD requires, but the things it requires are already pre-bundled in the minimized UMD module. What can I do to mitigate this?