-
Notifications
You must be signed in to change notification settings - Fork 9
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
Adding Webpack Dev Server #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
Let's see what comes out of our discussion of #28 , and see if that influences our direction on this feature.
…ix/webpack-errors
…s if alreayd exist
When tested with the rfc-user-workspace branch merged, the scaffold script fixed to prevent creating directories that already exist, as well as not cleaning on every build, the nodemon + webpack-dev-server script runs smoothly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this looks like a promising start!
Main concern with this approach as it stands currently is that it is happening entirely within npm / Yarn scripts, when it should really be happening within index.js.
From a user's perspective, as they will be running greenwood
from the CLI, for a feature like this, I would expect the API to be something like:
$ greenwood --[build|develop]
From within that, I would expect Greenwood to launch with the appropriate processes, eg.
- build:
webpack
- develop:
webpack-dev-server
and whatever else we need to get it to work
As far as the project goes, we can still use an npm script, but it would be similar to the build task, e.g.
$ node ./packages/cli/index.js --develop
From there, I would be interested to see if we can somehow define an additional entry point or watch capabilities from webpack itself? Maybe some sort of directory watching or webpack.config.develop.js specific entry point that can point to a user's src/ directory? 🤔
Some things I found that might be of help here
Closing this since #36 is pretty much good to go at this point. 👍 |
Resolves #14
Adds
Changes
Problems: