Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show stats and progress #261

Closed

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Nov 17, 2019

Related Issue

resolves #260

Now output looks like this

$ yarn build
yarn run v1.12.3
$ yarn clean && node . build
$ rimraf ./**/.greenwood/** && rimraf ./**/public/** && rimraf ./coverage
-------------------------------------------------------
Welcome to Greenwood ♻️
-------------------------------------------------------
Reading project config
Initializing project workspace contexts
Generating graph of workspace files...
Scaffolding out project files...
Generate pages from templates...
Writing imports for md...
Writing Lit routes...
setup index page and html
Scaffolding complete.
Building project for production.
Building SPA from compilation...
25% building 131/144 modules 13 active ...reen/repos/greenwood/node_modules/@evergreen-wc/eve-button/src/eve-button.css
...
webpack build complete
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  index.6e6dde8f7130188345bc.bundle.js (286 KiB)
...................................
Static site generation complete!
...................................
✨  Done in 21.34s.

Summary of Changes

  1. Log warning stats
  2. Enable webpack.ProgressPlugin *
    !. Add webpack-bundle-analyzer ?

@thescientist13 thescientist13 added the enhancement Improve something existing (e.g. no docs, new APIs, etc) label Nov 17, 2019
Copy link
Member Author

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... looks like the ProgressPlugin doesn't play nicely with our unit tests? (commenting it out locally makes things happy).

I wonder if it's the equivalent of #84 but for build? 🤔

Maybe I should resolve instead?

@thescientist13 thescientist13 self-assigned this Nov 17, 2019
Copy link
Member Author

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OH! Should add webpack-bundle-analyzer

Copy link
Member Author

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what's interesting looking at the build failure is that webpack is still compiling in the failure cases, even though the config lifecycle should have rejected that Promise already..

So seems like that part of the chain isn't working as expected. 🤔

@thescientist13 thescientist13 added the question Further information is requested label Nov 21, 2019
@thescientist13
Copy link
Member Author

thescientist13 commented Nov 21, 2019

even though the config lifecycle should have rejected that Promise already..

Ok, so I made sure the reject is happening now for that example, but this causes a conflict

  • with the reject the test now passes and stops webpack from building (good)
  • we catch this and process.exit(1), which "fails" the task (not good)

So this means our spec will pass (good) but yarn test command itself will fail (bad)....

We could not throw error code 1, but then when actually running yarn build, the build will just only silently fail... 🤔


edit, oh wait, this might be cause of code coverage since i was using describe.only, let me double check...

@thescientist13
Copy link
Member Author

Yeah, still seems to be something with ProgressPlugin throwing an error unexpectedly? Did find a bug with themeFile reject though. Pushing what I have for now.

Copy link
Member Author

@thescientist13 thescientist13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to close this for now and move the issue itself to the next project and we can tackle this along with #47

@thescientist13 thescientist13 deleted the enhancement/issue-260-webpack-build-info branch December 3, 2020 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve something existing (e.g. no docs, new APIs, etc) question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

show webpack feedback / progress indicators when building
1 participant