Skip to content

Conversation

@donaldpipowitch
Copy link

@donaldpipowitch donaldpipowitch commented Dec 23, 2017

What kind of change does this PR introduce?

Small fallback to test webpack-dev-server with [email protected].*.

Did you add or update the examples/?

No.

Summary

Now we can use this package with the webpack 4 alphas. See webpack/webpack#6179. Prevents Cannot find module 'webpack/bin/config-yargs' errors.

Does this PR introduce a breaking change?

No.

Other information

🎄❤️

@peter-mouland
Copy link

I've just come across the same problem.

As webpack v4 is still in alpha, I guess there is some decisions to be made about how else to handle this i.e. it's probably premature to roll this out now, but perhaps a webpack-dev-server v3-beta might be useful with note around people trying webpack v4?

Should this PR also update the peerDependencies from the package.json also?

@peter-mouland
Copy link

Hi @shellscape (sorry for at'ing you directly!) but I was wondering if it was realised that this prevents people from trying out anything greater than webpack v4-alpha.0? (i.e. alpha.1+ wont' work).

I saw some other issues already mentioning v3-beta but i could not see a branch or release with those tags. Would v3 fix this issue and Is v3 available for testing?

@quantizor
Copy link

Any chance this patch could be released as a beta version so it can be tested alongside the webpack 4 beta?

@lencioni lencioni mentioned this pull request Jan 29, 2018
2 tasks
@tomas2387
Copy link

tomas2387 commented Feb 3, 2018

To test this pull request, you can put it directly in your package.json

"devDependencies": {
   "webpack": "^4.0.0-beta.0",
   "webpack-cli": "^2.0.4",
   "webpack-dev-server": "github:donaldpipowitch/webpack-dev-server#patch-1"
 },

I executed it and it didn't work.

 $ ./node_modules/.bin/webpack-dev-server
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry should be one of these:
   object { <key>: non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
   -> The entry point(s) of the compilation.
   Details:
    * configuration.entry should be an object.
      -> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.
    * configuration.entry should be a string.
      -> An entry point without name. The string is resolved to a module which is loaded upon startup.
    * configuration.entry[1] should be a string.
      -> A non-empty string
    * configuration.entry should be an instance of function
      -> A Function returning an entry object, an entry string, an entry array or a promise to these things.

I dont know if I'm correctly understanding it, but It seems that it is asking for a configuration when webpack4 doesn't have one in the first place. 🤷

@SpaceK33z
Copy link
Member

Please test the latest beta, [email protected]. Also be sure to read the changelog.

@SpaceK33z SpaceK33z closed this Feb 14, 2018
@peter-mouland
Copy link

Amazing, thanks guys!!
for anyone else, this now works with my current test setup of:

    "webpack": "^4.0.0-beta.1",
    "webpack-cli": "^2.0.6",
    "webpack-dev-server": "^3.0.0-beta.1",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants