Webpack monitor stops running during build

scottsweb
16
scottsweb
commented a year ago

When I run npm run build --webpackmonitor, Webpack monitor exits before I can view the site. Terminal output is:

nuxt build --webpackmonitor

  nuxt:build Building... +0ms
  nuxt:pwa Adding icons +0ms
  nuxt:pwa Adding manifest +0ms
  nuxt:pwa Adding meta +0ms
  nuxt: Call build:before hooks (1) +0ms
  nuxt:pwa Adding workbox +0ms
  nuxt:build App root: /home/scott/Sites/scott +0ms
  nuxt:build Generating /home/scott/Sites/scott/.nuxt files... +0ms
  nuxt:build Generating files... +6ms
  nuxt:build Generating routes... +11ms
  nuxt:build Building files... +46ms
  ████████████████████ 100% 

Build completed in 6.82s

 WARNING  Compiled with 1 warnings                                                                                                                    21:51:51

 warning  

asset size limit: The following asset(s) exceed the recommended size limit (300 kB).
This can impact web performance.
Assets: 
  icons/icon_512.f00x800w000.png (357 kB)

Hash: 7c3338a414a22426a423
Version: webpack 3.11.0
Time: 6822ms
                                    Asset       Size  Chunks                    Chunk Names
            icons/icon_64.f00x800w000.png    9.46 kB          [emitted]         
 pages/post/_slug.acaeb6f9a733d3a3f218.js    3.05 kB       0  [emitted]         pages/post/_slug
pages/_slug/index.f4f0b94e75caa9c5bef8.js  848 bytes       2  [emitted]         pages/_slug/index
  layouts/default.a6a6d886801607879689.js  658 bytes       3  [emitted]         layouts/default
           vendor.6a7a034393f3916b321c.js     153 kB       4  [emitted]         vendor
              app.49edf950603dc4f7fa02.js    31.4 kB       5  [emitted]         app
         manifest.7c3338a414a22426a423.js    1.56 kB       6  [emitted]         manifest
                                 LICENSES  645 bytes          [emitted]         
      pages/index.c5d85e42449b7910f7f8.js    3.19 kB       1  [emitted]         pages/index
           icons/icon_120.f00x800w000.png      29 kB          [emitted]         
           icons/icon_144.f00x800w000.png      40 kB          [emitted]         
           icons/icon_152.f00x800w000.png    43.6 kB          [emitted]         
           icons/icon_192.f00x800w000.png    65.1 kB          [emitted]         
           icons/icon_384.f00x800w000.png     216 kB          [emitted]         
           icons/icon_512.f00x800w000.png     357 kB          [emitted]  [big]  
                   manifest.9024bed0.json  900 bytes          [emitted]         
 + 2 hidden assets

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (300 kB).
This can impact web performance.
Assets: 
  icons/icon_512.f00x800w000.png (357 kB)
  nuxt: Call build:done hooks (2) +7s

Webpack-Monitor is running on port 8085!
Press ctrl C to exit
  nuxt: Call generate:distRemoved hooks (1) +31ms
  nuxt:build Destination folder cleaned +8s
  nuxt: Call generate:distCopied hooks (1) +71ms
  nuxt:build Static & build files copied +70ms
  nuxt:render Rendering url / +0ms
  nuxt: Call generate:page hooks (1) +11ms
  nuxt:build Generate file: /index.html +11ms
  nuxt:render Rendering url / +11ms
  nuxt: Call generate:done hooks (1) +6ms
  nuxt:build HTML Files generated in 8.4s +7ms

It looks like it spawns and exits part way through the build.

2
David-Mueller
25
David-Mueller
commented a year ago

Hi,

nuxt exits the process after building.
Use yarn nuxt build --webpackmonitor --analyze or set the analyze build option in nuxt.config.js and it should keep running.

Btw. check out http://localhost:8888/ as well.

0
scottsweb
16
scottsweb
commented a year ago

@David-Mueller thanks, that seems to work well. Might be worth adding this as a script in package.json?

0
David-Mueller
25
David-Mueller
commented a year ago

Yeah, might be a good idea to add it to the nuxt project's package.json
Not sure, if nuxt modules are able to hook into existing nuxt npm scripts. Although this might be a nice idea…

1
Informations
QuestionUnresolved
#c1 - Created a year ago