kyt icon indicating copy to clipboard operation
kyt copied to clipboard

Add option to bubble up Webpack output

Open tizmagik opened this issue 8 years ago • 5 comments

Webpack 2.2 RC

Webpack 2.2 RC includes support for Performance Budgets (also, dynamic imports, etc). However, kyt currently silences webpack's output so users won't be able to take advantage of this feature.

Read more here: https://medium.com/webpack/webpack-performance-budgets-13d4880fbf6d#.da4lr9175

Bug or Feature?

Feature

Current Behavior

Webpack output is swallowed

Desired Behavior

Webpack output is (optionally?) visible

Potential Solutions

  1. Include an option in kyt.config.js to bubble up/opt for Webpack's output
  2. Remove kyt's current output handling and leave it up to Webpack

I'd suggest #2 because Webpack's output is much richer than what we currently show. We can still emojify the start/end to communicate clearly to the user what's going on task-wise, but otherwise muting webpack's output seems a disservice, especially given the new Performance Budget feature.

Thoughts?

tizmagik avatar Dec 15 '16 16:12 tizmagik

+1 on optionally show webpack's output

nahue avatar Dec 29 '16 12:12 nahue

any news on this?

nahue avatar Jan 16 '17 13:01 nahue

I think the plan is to release kyt 0.4.0 and then look in to upgrading Webpack since there are some potentially breaking changes there.

tizmagik avatar Jan 16 '17 19:01 tizmagik

We could probably reach into the webpack stats and surface the performance budget to users so that we can avoid all of the other noise that webpack logs. But I'm not sure if kyt is going to need this feature soon. After we land vendor bundling and work on a user manual that better explains the goals behind code splitting in React apps, and since most users probably create projects from our starter kyts, most kyt projects won't need the warnings that this tool provides. Osmani's original rationale behind this feature was to warn users that were likely building a single dist: "we noticed quite a few folks were shipping down monolithic JavaScript bundles." I don't think this will apply to most kyt projects, especially if we're doing a good job of guiding our users.

delambo avatar Feb 01 '17 19:02 delambo

Just to follow up here: as discussed in person, it still makes sense to have the option of showing the webpack output (for things like this performance budget and otherwise) because it is still possible to ship down a large JS chunk even if you're code-splitting at the route level. In those cases, having the performance budget warning would indicate to users to code-split within a given route, etc.

tizmagik avatar Feb 22 '17 21:02 tizmagik