Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Eject config? #25

Closed
egoist opened this issue May 9, 2017 · 5 comments
Closed

Eject config? #25

egoist opened this issue May 9, 2017 · 5 comments

Comments

@egoist
Copy link

egoist commented May 9, 2017

This is a Feature Request.

I wonder if you're interested in implementing the eject webpack config feature (similar to what create-react-app does):

config.entry('client').add('src/index.js')

config.plugin('define')
  .use(webpack.DefinePlugin, [{foo: 'foo'}])
  .outputName('webpack.DefinePlugin')

config.toString() // or maybe config.toConfig({ string: true })
//=> '{"entry":{"client":["src/index.js"]},"plugins":[new webpack.DefinePlugin({\"foo\": \"foo\"})]}'
@eliperelman
Copy link
Member

I think this is a reasonable feature. As a start, you could probably do something similar to what is happening in Neutrino when we call --inspect:

https://github.com/mozilla-neutrino/neutrino-dev/blob/master/packages/neutrino/src/inspect.js

@edmorley
Copy link
Member

edmorley commented May 12, 2018

Vue CLI have just implemented an even better version of inspect, in:
vuejs/vue-cli@f6bfb63
https://twitter.com/youyuxi/status/994991452374683649

I think it seems reasonable to add javascript-stringify as a dependency of webpack-chain, and move this type of functionality into it, rather than making every consumer re-invent the wheel.

CC @yyx990803

@edmorley
Copy link
Member

Fixed by #53, published in webpack-chain v4.7.0.
Many thanks to @yyx990803 for the PR!

@edmorley
Copy link
Member

For anyone subscribed to this issue for use with Neutrino...

Neutruno v8.3.0 has just been released, which backports the upcoming Neutrino 9's improved --inspect feature, as --inspect-new.

@mindplay-dk
Copy link

Didn't work for me - here's a more general way:

neutrinojs/neutrino#96 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants