hrynko / vue-pdf-embed

PDF embed component for Vue 2 and Vue 3
https://npmjs.com/package/vue-pdf-embed
MIT License
708 stars 109 forks source link

Vue-pdf-embed build with docker #152

Closed gmcaixeta closed 8 months ago

gmcaixeta commented 1 year ago

Hi, I getting some problems during image build:

1- This message: Use of eval in "node_modules/vue-pdf-embed/dist/vue3-pdf-embed.js" is strongly discouraged as it poses security risks and may cause issues with minification.

2- this message:

 (!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

3- This message :

vue-pdf-embed (imported by /app/src/views/DocumentVisualizer.vue?id=0)
Are they installed?

Entire log:

Successfully built 05b871f2ce22
Successfully tagged middleware:latest-local
Building frontend
Step 1/8 : FROM node:18-alpine
 ---> 264f8646c2a6
Step 2/8 : WORKDIR /app
 ---> Using cache
 ---> ace7a11d368d
Step 3/8 : COPY package*.json ./
 ---> Using cache
 ---> 8dee94703fc5
Step 4/8 : RUN npm install -g npm@9.3.1
 ---> Using cache
 ---> f03fa9f4b9dc
Step 5/8 : RUN npm install
 ---> Using cache
 ---> 87156882bf51
Step 6/8 : COPY . .
 ---> 2464335fc1b8
Step 7/8 : RUN npm run build
 ---> Running in 4d7648b2555b

> site-validador@0.0.0 build
> vue-tsc --noEmit && vite build

vite v4.4.4 building for production...
transforming...
node_modules/vue-pdf-embed/dist/vue3-pdf-embed.js (1:153142) Use of eval in "node_modules/vue-pdf-embed/dist/vue3-pdf-embed.js" is strongly discouraged as it poses security risks and may cause issues with minification.
✓ 274 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html                                             0.84 kB │ gzip:   0.38 kB
dist/assets/logo-910381ac.png                               6.44 kB
dist/assets/materialdesignicons-webfont-e52d60f6.woff2    385.36 kB
dist/assets/materialdesignicons-webfont-48d3eec6.woff     561.78 kB
dist/assets/materialdesignicons-webfont-bd725a7a.ttf    1,243.50 kB
dist/assets/materialdesignicons-webfont-861aea05.eot    1,243.72 kB
dist/assets/vuetify-8a48d928.css                           69.77 kB │ gzip:   9.85 kB
dist/assets/index-d33e2c08.css                            231.49 kB │ gzip:  27.17 kB
dist/assets/@mdi-ed77c440.css                             293.55 kB │ gzip:  49.20 kB
dist/assets/AppLoading-ac9fc2c1.js                          0.48 kB │ gzip:   0.33 kB
dist/assets/pinia-b084ef83.js                               0.56 kB │ gzip:   0.40 kB
dist/assets/Default-49e0d716.js                             0.69 kB │ gzip:   0.41 kB
dist/assets/DocumentVisualizer-00f2a5a1.js                  1.19 kB │ gzip:   0.72 kB
dist/assets/HomePage-72a843b4.js                            2.59 kB │ gzip:   1.29 kB
dist/assets/index-c6111dd5.js                               3.25 kB │ gzip:   1.51 kB
dist/assets/vue-95265a43.js                                 4.47 kB │ gzip:   2.17 kB
dist/assets/webfontloader-ee2159e1.js                      12.68 kB │ gzip:   5.17 kB
dist/assets/vue-router-ed63ddd7.js                         22.91 kB │ gzip:   9.39 kB
dist/assets/axios-4a70c6fc.js                              28.96 kB │ gzip:  11.57 kB
dist/assets/@vue-649ae4d2.js                               87.28 kB │ gzip:  34.34 kB
dist/assets/vuetify-3e6ef1b0.js                            96.66 kB │ gzip:  32.39 kB
dist/assets/vue-pdf-embed-82412845.js                   1,701.80 kB │ gzip: 447.55 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
hrynko commented 8 months ago

Hi @gmcaixeta,

Please check https://github.com/hrynko/vue-pdf-embed/issues/90#issuecomment-1902100099, I think it might be related. Otherwise, feel free to reopen this issue.