-
Notifications
You must be signed in to change notification settings - Fork 214
Plugin class names missing from --inspect output #328
Comments
The output of --inspect is essentially the config that will be passed to webpack, but sorted and formatted. Webpack doesn't accept this config with named output, it doesn't match its schema. Maybe we can change |
Yeah I understand it's not meant to be passed to webpack, that's not what I want to use it for. The bug here is that the current serialised representation is incomplete -- it omits key information (the plugin names) to be able to understand the current configuration (eg when reviewing a PR that changes a project's Neutrino config, and diffing the |
From
You're right; this statement makes it sound like we are giving the Neutrino configuration and not the Webpack configuration. Switching it to the Neutrino config would be a breaking change. We can either fix the wording of the help to reference webpack, or change the output. Both outputs are useful, so we need a way to see both. |
I think we might still be miss-understanding each other? I don't really mind whether the output is technically neutrino config or webpack config, all I would like is for the output to include as much debugging information as possible. However at the moment names of the plugins aren't specified anywhere. From the OP above:
Now whilst I can guess that these plugin options are for the |
Though as a separate issue/feature request, having a way to view both the Neutrino config and webpack configs would be useful :-) |
I think I understand: right now you are seeing the webpack config, and you want the Neutrino config so you can see the names of entities. |
I think I see where the confusion is coming from - surely the webpack config has to include the plugin names at some point? (Yes passed as objects, but that could still be serialised?) |
And just in case, another clarification: By plugin names, I'm not meaning the identifier (eg |
Note that this would be a breaking change, since switching the format of the inspection would break uses of diff when comparing to before and after this change: |
I guess what I'm really after is an equivalent to create-react-app's "eject" feature. |
This take advantage of the new webpack-chain `toString()` added in neutrinojs/webpack-chain#53. The output from `neutrino --inspect` now lists the correct plugin declarations and arguments, annotates plugins/loaders with hints about how to reference them in a custom Neutrino config, and supports using `__expression` to override the stringified output when needed. The usage of `deep-sort-object` has been removed since it breaks the new `toString()` comment annotations, and really if sorted output is considered important, it should be handled by webpack-chain itself. Fixes #328. Refs #96.
This backports #928 to `release/v8` under a new argument name, to prevent it from being a breaking change. This will allow Neutrino 8 users to benefit from the stringifed config improvements sooner, as well as providing a way to compare v8 and v9 configurations. I've not backported the eslint `formatter.__expression` change, since it would require a fair amount of refactoring, increasing risk for little benefit. Fixes #328 for `release/v8`.
v8.3.0 has just been released, which backports the upcoming Neutrino 9's improved |
Currently the output when using
--inspect
includes aplugins
property, which contains an array of plugin options but not the actual name of the plugin to which the options belong.For example:
To work out the mapping of plugins to options, I have to cross-reference against the output from
neutrino.config.toConfig()
:This is using neutrino 6.2.0 and webpack-chain 3.3.0 with node 8.5.0.
The text was updated successfully, but these errors were encountered: