- Move types to `pluing/types.d.ts`
- Update plugin signature to webpack 5 inclusive format
- Add webpack type check to `check-ts`
- Add `yarn dev-ts` TS-based configuration example to our examples...
Refactors the plugin internal logic to be a lot simpler.
- Chore: Refactor internal stats consumption to perform `inspectpack` analysis in the main thread, without using `main` streams. Originally, the `inspectpack` engine did some really heavy CPU stuff (gzipping lots of files), but now the actions are super fast, so I've removed `most` async observables and just switched to straight promises.
- Chore: Refactor internal handler in plugin to always be a wrapped function so that we can't accidentally have asynchronous code call the handler function after it is removed / nulled.
- Bugfix: Add message counting delayed cleanup in plugin to allow messages to drain in Dashboard. The issue seems to be that we hit socket IO disconnect in the plugin before the dashboard actually processes the messages. Fixes#294.
- Ensure a finished compilation state (failed, error, success) isn't overwritten by the ProgressPlugin. Fixes#321
- Add error status inferred from webpack stats.
- Add `DashboardPlugin({ includeAssets: [ "stringPrefix", /regexObj/ ] })` Webpack plugin filtering option.
- Add `webpack-dashboard --include-assets stringPrefix1 -a stringPrefix2` CLI filtering option.
- Change `"mode"` SocketIO event to `"options"` as it now passes both `minimal` and `includeAssets` from CLI to the Webpack plugin.
- Fix unit tests that incorrectly relied on `.complete()` for `most` observables.
- Add additional `examples` fixture of `hello` for development (useful for this scenario to have 2).
- Updates a really old README PNG of the dashboard CLI!
- Replaces @wapgear 's great initial foray into an `--ignore-assets` flag. Closes#289
- Limits the webpack stats messaged object to just errors and warnings. Fixes#279
- Add client disconnect / error messages to help analogous issues in the future.
This is a major update to `webpack-dashboard` with breaking changes. And a lot of speed and coolness.
## Breaking changes
- Requires node6+.
- Use the webpack internal stats object instead of real bundles. This is faster and with less futzing / parsing on the dashboard's end. Should permanently fix the `no code sections` found errors.
- We've removed command flags / plugin options that no longer apply like `--root`, etc.
### Modules
- Removed `min` and `min+gz` estimated file sizes from modules outputs. This dramatically speeds up the dashboard and reduces CPU usage.
### Versions
- Version skews should be detected more accurately and much faster thanks to dramatically improved heuristics from `inspectpack`.
### Duplicates
- Duplicates now reports on duplicate files that are (1) completely identical, and (2) the same package name and file path but with different sources. The first are low hanging fruit for optimizations in your build -- you've literally got the same thing multiple times. The latter needs to be coalesced at the package dependency level -- something the versions output can help with.
## Issues
- Upgrade hooks to work in webpack1-4 with abstraction. Fixes#240
## Refactoring
- Switch from `chalk` to using Blessed's built-in tags for coloring. This is definitely the way to go as things like table spacing don't work with chalk strings and work like a charm with Blessed tags.
- Update dependencies and remove lots of unused things (like `lodash`, `chalk`, `bluebird` and a whole lot of `babel*` that apparently wasn't used anyways).
- New `inspectpack` is way slimmer and faster, with no more binary dependencies!
- Switch to yarn-only workflow in dev.
- Bump Travis node versions.
Adds `minified` and `gzip` configuration options that can optionally disable the relatively expensive per-module calculations of each by `inspectpack` under the hood.
- Fixes#227
- Adds `minified` and `gzip` plugin options, both defaulted to `true` so we don't need a semver major bump.
- Adds more README documentation and explanations about CPU intensive workloads and the `inspectpack` cache.
This makes it so the dashboard plugin can be configured without creating the inspectpack daemon. If the daemon is created in the constructor, the plugin cannot be conditionally applied. Currently, if the plugin is configured and added as part of a development only config, the process running the production config will never exit. With the changes here, the plugin can be configured but if it is never applied, the webpack process exits properly.
Fixes#96.
Fixes#125.
* Add support to change the host in the plugin options
* Add the host option to the documentation and clarify in the docs what act as server and what act as client
* Fix the double quote lint error
We have a bug opened in `inspectpack` repo that is really a `webpack-dashboard` issue. Fixes https://github.com/FormidableLabs/inspectpack/issues/45
The `inspectpack` `versions` action detects versions skews in installed packages within a webpack bundle by actually traversing the `node_modules` installed from the "project root" which is basically the directory that contains the operating `package.json`.
Some bespoke webpack configurations change `bundle.context` to something _other_ than a directory that is our "project root". This causes `inspectpack` to rightfully bomb out with a `Error: Unable to find project root package.json` error -- because if you're running `versions` you need to have this accessible.
In `webpack-dashboard`-land, it pays to be a little more permissive, because folks might not mind missing `versions` for getting all the _other_ cool dashboard stuff. So, accordingly, here's how the dashboard now deals with the problem:
1. If the `DashboardPlugin` specifies a `root` option to the root project directory, we use that. **Note**: We don't _check_ it's valid -- if it's invalid and manually specified you **will** get this same error.
2. If no `root` is specified, try to see if `bundle.context` has a `package.json`, use that.
3. If `bundle.context` isn't workable, try `process.cwd()`.
4. If `process.cwd()` isn't usable, then just _disable_ the `versions` action for the dashboard.
The plugin sends log message through the socket
If the dashboard is used as it is now, this is simply ignored
It is however printed if the user doesn't provide a command
`json-socket` has issues with multibyte characters in large messages.
`socket.io` appears to be much more actively maintained and properly
supports the messages `json-socket` was having problems with.
* - Fixes windows by using cross-spawn, closes#57, #62
- Fixes babel node issue where child processes aren't killed, closes#61
* Cleaning up quotes and passing colors through
* Fixing log color output